Skip to content
opengeek edited this page Apr 6, 2012 · 3 revisions

The following properties are available for the getCache snippet.

  • namespace - An execution namespace that serves as a prefix for placeholders set by a specific instance of the getCache snippet.
  • element - The name of the MODx Element to process and cache.
  • elementClass - The class of the MODx Element to process and cache; default is modSnippet.
  • cacheKey - An optional key identifying a custom cache handler to use instead of the cache_resource handler.
  • cacheHandler - An optional cache handler class to use instead of the one used by cache_resource.
  • cacheExpires - The amount of time, in seconds, that the output from the Element will be cached.
  • cacheElementKey - A custom identifier for the output to be stored as in the cache. If not specified, the output is cached using a unique signature based on the Resource it is being executed on, the properties sent to the Element being processed, and any non-standard $_REQUEST parameters that were detected.
  • toPlaceholder - The name of a placeholder the Element being called is setting it's output to. This allows getCache to support caching the output of Snippets that do not directly return their output, but allow toPlaceholder to specify the name of a placeholder to store it in.
Clone this wiki locally