Store function cache overview

Store function caching eliminates querying of database tables when evaluating the store function enablement values for a customer.

FlexFlowCache (WCFlexFlowDistributedMapCache)

The FlexFlowCache instance is a location where a distributed map cache (WCFlexFlowDistributedMapCache DistributedMap) stores data pertaining to store functions.

The data stored in the FlexFlowCache includes:
  • Store IDs
  • Store function names
  • Store function values

Cache invalidation

After you establish that data is correctly added to the FlexFlowCache, ensure that the cached data being retrieved is not stale or invalid by running the wcs.cacheivl.trigger.sql file to enable the following triggers for the FlexFlowCache:
  • civi_ems
  • civu_ems
  • civd_ems
  • civi_dm8
  • civu_dm8
  • civd_dm8

These database triggers automatically detect changes to the values in the EMSPOT and DMEMSPOTDEF database tables and insert these changes into the CACHEIVL database table. Specially formulated invalidation IDs are appended to this database table, in the DATAID column. The DynaCacheInvalidationCmd scheduled job processes the rows in the CACHEIVL database table and issues appropriate cache invalidations. When this technique is used there is a period of time between when the database changes are made and when the DynaCacheInvalidation scheduled job performs the invalidations. During that time period, the old stale cached data is used.