How long does it take for property change to reflect?

Ravish Shetty
Tera Guru

We have a property change being moved to our production instance.

How long will it take to reflect this new change as the Ignore cache is false.

Do we need to do a cache flush manually by doing a cache.do?

If yes then are there any significant implications?

Can there be an alternate approach for this?

8 REPLIES 8

Kalaiarasan Pus
Giga Sage

tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Ravio,



Ignore cache is explained here:


http://wiki.servicenow.com/index.php?title=Adding_a_Property


..


Ignore cache



Set this option to true to avoid flushing the cache when the value changes. The cache stores commonly used items in memory such as forms and UI elements. Typically, you only need to ignore the cache if the system property depends upon a dynamic change on the form, and you want to ensure the property uses the current value rather than a cached value.


..



The above requires careful reading as a double negative is used.




The important sentence is here:


"Set this option to true to avoid flushing the cache when the value changes."




So, if "Ignore cache is true." then then cache flushing is avoided.




Similarly, if "Ignore cache is false", then cache flushing is not avoided.




Best Regards




Tony


tony_barratt
ServiceNow Employee
ServiceNow Employee

Hi Ravio,



Consider marking the question as answered, or marking replies as helpful as appropriate.


Or ask further questions or tell us what solution you found.


This will add value to Community Members reading this thread.



Best Regards



Tony


Mwatkins
ServiceNow Employee
ServiceNow Employee

This is a confusing topic that I'd like to clarify since there are some performance concerns that come into play.

ServiceNow is a clustered platform with multiple "nodes" or JVMs working as a single "instance" of ServiceNow (e.g. acme.service-now.com). 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 happens regardless of if the ignore_cache field is set to true or not.

If ignore_cache = false - this is the default value - then we not only flush the specific property cache but we also flush the whole Glide System cache. Let me say that again and 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 has 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 some code that caches the UI on the server-side for performance optimization. And suppose that the way the UI renders depends on the value of the property that was just changed. If we don't flush the UI cache then the old value of the property will still be getting used.

NOTE: This whole discussion is only in relation to server-side caching. It has nothing to do with browser caching.

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.