-
Notifications
You must be signed in to change notification settings - Fork 20
Cache breaking rules
Cache-breaking rules can be used to clear specific variables, or groups of variables, after creating or editing content.
Start a rule by selecting the 'hook' you want to use as the trigger event. You may use the same hook multiple times for different rules.
Expressionengine hooks are triggered by specific events in ExpressionEngine: for example, after publishing, editing or deleting an entry.
Many third party add-ons provide their own hooks, and you can also create custom hooks for use with the Mustash API.
When your hook is triggered ALL variables in the current site will be cleared, UNLESS you use the following fields to limit the action of each rule:
A group is the parent grouping of the item that is being edited. For example, an entry might be published in the 'blog' channel, so it's parent group would be 'blog'. Choose a group to limit your rule to items that you edit within that group only.
Choose a bundle name to limit your rule to variables assigned to that bundle only.
Choose a scope to limit your rule to variables within that scope only.
The pattern field allows you to enter a string or MySQL-flavoured regular expression to match variable names.
Some hooks allow you to use {markers}
in the pattern. Click the 'Need help?' button to view the markers available for each hook.
my_variable
my_context:my_variable
#^my_context:my_variable$#
#^my_context:{url_title}$#
Getting started
Using Stash
Using Mustash
- Mustash
- Installing Mustash
- Managing variables
- Managing bundles
- Cache-breaking rules
- Mustash plugins
- Mustash Varnish plugin
- Mustash plugin development
- Mustash API
Template design patterns
Tag reference
- {exp:stash:set}
- {exp:stash:get}
- {exp:stash:block}
- {exp:stash:set_value}
- {exp:stash:append}
- {exp:stash:append_value}
- {exp:stash:prepend}
- {exp:stash:prepend_value}
- {exp:stash:copy}
- {exp:stash:context}
- {exp:stash:is_empty}
- {exp:stash:not_empty}
- {exp:stash:set_list}
- {exp:stash:get_list}
- {exp:stash:append_list}
- {exp:stash:prepend_list}
- {exp:stash:split_list}
- {exp:stash:join_lists}
- {exp:stash:list_count}
- {exp:stash:unset}
- {exp:stash:flush_cache}
- {exp:stash:bundle}
- {stash:embed}
- {exp:stash:extend}
- {exp:stash:parse}
- {exp:stash:cache}
- {exp:stash:static}
- {exp:stash:finish}
- {exp:stash:not_found}
- Short tag syntax
- Using Stash methods in your own add-ons