Flush specific caches

Stephen W_
Giga Guru

There are certain actions that frequently cause caching issues for some users.

Examples:

        1. I have a business rule that creates catalog categories and adds an m2m record to associate an existing catalog item with that category.

        For some users, that new category is not visible until I flush the cache. (instance.com/cache.do)

       

        2. If I have a category in my catalog with one item in it, and that item is deactivated or deleted.   Frequently that category remains visible (but empty) until the cache is flushed.

Is anyone aware of a means to force a flush/rebuild of whatever cache object is being used for this, without affecting the rest of the cached indexes/objects?

Thanks,

-Stephen

6 REPLIES 6

Kalaiarasan Pus
Giga Sage

Cache refresh is a potential pitfall.



Troubleshooting Performance - ServiceNow Wiki


This is why I was asking about a more specific cache interaction.  


Otherwise, I have to frequently flush all of it.     Which I'd rather not do.


Adding a record to m_2_m has nothing to do with cache refresh. Is the details of the newly added entries not visible on a UI page ? It may be related to the processing phases of jelly.


My mention of the M2M is a red herring. The problem exists when a category is added to the catalog, or the only item in a category is removed. Frequently, the category does not appear when it should or does not disappear when it should.   ..until the cache is flushed.



This problem exists whether the category or item, (or item reference) is added manually, or via script.