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:
- On the ScaleArc dashboard, click Clusters > Settings > Transparent Cache.
- Click the Cache Invalidation tab.
Click on the Gear (edit) icon to add or configure caching patterns for a selected database.
Note: Make sure you have the database configured for the user before you add an invalidation pattern.
Click the Gear icon against an existing group to edit the patterns within the group.
- Click Add Group to create a new group. Click the red Delete icon to remove a selected group.
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.
Back to top