Clone this wiki locally
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