Cache Invalidation

This feature automatically invalidates a cache entry based on the updates occurring on the database. You can add invalidation patterns to the system and map these invalidation patterns to caching patterns by making them belong to the same group. When the invalidation pattern matches, it invalidates the cache patterns in the group.
While adding a query pattern to a cache invalidation group remember the table name and the column name must be present in the pattern and the pattern regex should fetch the column value. This is ensured by having ‘()’ around the column value. The regex pattern should be constructed keeping these rules in mind.
Similar rules apply for an invalidation pattern. For stored procedure pattern it is important that the parameter that depicts the column value should be within ‘()’. Ensure that a cache pattern which belongs to a group should be unique across all patterns present either in normal cache rules or other groups.
Set up a logical group of cache invalidation patterns by following these steps: 

  1. On the ScaleArc dashboard, click Clusters > Settings > Transparent Cache.

    Transparent_cache.png 
     
  2. Click the Cache Invalidation tab. 

    CacheInvalidation_MySQL.png 
     
  3. Click on the Gear (edit) icon to add or configure caching patterns for a selected database. 

    CacheInvalidation_AddGroup_MySQL.png 

    Note: Make sure you have the database configured for the user before you add an invalidation pattern.
  4. Click the Gear icon against an existing group to edit the patterns within the group.

  5. Click Add Group to create a new group. Click the red Delete icon to remove a selected group.

    CacheInvalidation_AddGroup2_MySQL.png 
     
  6. Click on Add Rule to add patterns for caching and invalidation within this group. Specify the pattern and select the pattern type. In addition, you may choose to enable/disable the rule or add a stored procedure caching pattern as well.

    CacheInvalidation_AddPattern_MySQL.png

Back to top

 

Comments

0 comments

Please sign in to leave a comment.