What if "ignore cache" checkbox is set to true for a "system property"

Murgan
Kilo Contributor

Hi all,

I unknowingly set "ignore cache" checkbox is set to true for two "system properties", these values are static and not going to change. Would this give any impact, shall I continue without correcting it or need to be corrected.

Thank you in advanc for all who are going to answer.

Regards,

Murgan

1 ACCEPTED SOLUTION

Having a couple of System properties set as 'ignore cache' is unlikely to have any performance impact.


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

View solution in original post

6 REPLIES 6

If this has solved your inquiry, please mark the solution as correct so it can be removed from the unsolved list.

Thanks 🙂


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

GTSPerformance
Tera Guru

We'd like to add some info to this thread. The following information has been posted elsewhere, but bears repeating:

ServiceNow is a clustered platform with multiple "nodes" or JVMs working as a single "instance" of ServiceNow (e.g. The URL acme.service-now.com seems like one website, but in the backend all requests are load balanced across multiple application servers, hosting various JVMs). Properties (records in the sys_properties table) are cached in node memory. This is a way of avoiding database calls for commonly accessed values.

When a property is changed on one node, it tells all the other nodes to 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.

However, if ignore_cache is set to false - this is the default value - then we not only flush the specific cache related to properties, but we also flush the whole Glide System cache!! Let me say that again and, please, pay attention to the double negative. 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 would we do it? The reason that this cache flush is done is 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.

For example, imagine that you have a UI cache that stores the rendered HTML of a page on the server-side, on a per session basis. The purpose of a such a cache would be to avoid rendering the same page over and over for the same user. Now suppose further that the way the HTML renders depends on the value of a property that was just changed. If we don't flush this UI cache then the old value of the property will still be getting used in the rendered HTML and any changes you expect to see in the UI based on the change of the related property would not reflect in the UI until the user starts a new session - i.e. until they log out and log back in. In this scenario you would want to make sure that ignore cache is set to false so that we will not ignore the cache flush, thereby ensuring that any dependent cache would also be flushed.

NOTE: This whole discussion about sys_property.ignore_cache is only in relation to ServiceNow server-side caching. It has nothing to do with the caching mechanisms implemented on the client-side; within Browsers/User Agents.

So, in summary, if you have a property value that will be frequently updated (more than, say, once a month) and you know that there are no other caches that might depend on the value of the property, 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.

Alternatively, you could just use some table besides sys_properties in which to store the value. However, we recognize that if you were to use a new custom table that would incur licensing charges and so this might not be a viable option.

Best regards, ServiceNowPerformanceGTS