Jason Coward edited this page Mar 20, 2013 · 6 revisions


getCache is a general purpose Snippet for MODx Revolution that can cache output from another MODx Element for a configurable amount of time, and utilizing a configurable cache handler.

Note that getCache uses the cache handler configured for cache_resource and caches using a unique identifier based on the Resource's cache_key it is running on. This way, by default, when a Resource cache is cleared, so will the cached output of the Element being called by getCache. You can change this behavior by customizing the various properties.

getCache version 1.1.0 introduces a processor which can be used to refresh custom cache partitions which may be used with getCache (via the cacheKey property). This processor can be called via PHP, using the modX::runProcessor() method, or in JavaScript using the provided connector.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.