Community Alums
Not applicable

What’s ‘Ignore Cache’ in ServiceNow?

Ignore Cache is a Glide Properties (records in the sys_properties table) field that impacts system performance. ‘ignore_cache’ is a way of avoiding database calls for commonly accessed property values. 'Ignore cache' means when the system property value changes, this is immediately put into effect.

 
Untitled Diagram.drawio.png
When it’s not handled carefully it can cause a system-wide cache flush leading to potentially severe performance degradation for anywhere from 5 to 30 minutes. In some very rare cases, the cache flush can even bring nodes down hard enough that the load balancer takes them offline, thus resulting in temporary session imbalance and causing hours of impact. Refer KB1000746
AbhishekPande1_0-1715074639607.png

 

When to use ‘ignore cache’ on 'sys_properties records?

You should almost always have 'ignore cache' set to "true" on 'sys_properties' records.

 

KB1000746 : One particularly confusing topic regarding Glide Properties (records in the sys_properties table) is the performance impact incurred when they are changed. When you change a Glide Property it can cause a system-wide cache flush leading to potentially severe performance degradation for anywhere from 5 to 30 minutes. In some very rare cases, the cache flush can even bring nodes down hard enough that the load balancer takes them offline, thus resulting in temporary session imbalance and causing hours of impact.

ServiceNow is a clustered platform with multiple "nodes" or JVMs working as what appears to the internet as a single "instance" of ServiceNow (e.g. <instancename>.service-now.com ).

ignore_cache on System Properties

  • Ignore cache = True: An update or insert of a system property will rebuild ONLY for that particular sys_property cache (yes, it is not a full ignore).

  • Ignore cache = False: This will trigger a full cache flush, which might result in performance issues, slowness, and in some cases outage of 5 to 30 mins.

Properties are cached in node memory, meaning each node in the cluster has its copy of each property. This is a way of avoiding database calls for commonly accessed property values. When a property is changed on one node, the other nodes dump their property caches and get the new value of all their properties from the database again. This has a completely trivial impact on system performance. This part happens regardless of if the ignore_cache field is set to true or not.

 

Recommendation as Best Practice to Avoid Performance Issues

To prevent the cache flush in the future for the same system property, you can activate the Ignore cache i.e always select the ignore_cache checkbox

In summary, unless you have some very good reason that the entire system cache needs to be flushed when a Property is changed, then set ignore_cache = true. That way the system will only flush the property-specific cache when the property is updated and not the whole Glide System cache.

Thus, you will avoid the performance impact of a whole system cache flush.

However, if ignore_cache is set to false - this was the default value until the Rome release - then we not only flush the specific cache related to properties, but we also flush the whole Glide System cache!! 

 

Pay attention to the double negative.

If ‘ignore_cache’ is unchecked, then the entire Glide System cache will be flushed when a Property is changed

 

 If a property is set to not ignore the cache, then we are telling it to flush the whole Glide System cache! This is what triggers the significant performance impact.

 

So why does it need to be done?

The reason that cache flush is done, so that we make sure to flush any dependencies or stale values in other caches that might be related to the old value of the property that was just changed.

References
  1. KB1000746: When to use 'ignore cache' on 'sys_properties records

  2. KB0822644: Bad performance caused by cache flush: User reports instance slowness overall

  3. KB0728009: Activate and Deactivate homepage caching

  4. KB0793295: What can cause a full system cache flush

  5. Community thread: 

Spoiler
References
  1. KB1000746: When to use 'ignore cache' on 'sys_properties records

  2. KB0822644: Bad performance caused by cache flush: User reports instance slowness overall

  3. KB0728009: Activate and Deactivate homepage caching

  4. KB0793295: What can cause a full system cache flush

  5. Community thread: