Difference: VarVARCACHE (1 vs. 2)

Revision 22019-01-03 - TWikiAdminUser

Line: 1 to 1
 
META TOPICPARENT name="TWikiVariables"

VARCACHE{ attributes } -- cache TWiki variables in selected topics for faster page rendering

Revision 12019-01-03 - TWikiAdminUser

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="TWikiVariables"

VARCACHE{ attributes } -- cache TWiki variables in selected topics for faster page rendering

  • The %VARCACHE{}% variable is handled by the VarCachePlugin.
  • Syntax: %VARCACHE{ "24" }%
  • Supported attributes:
    Attribute Comment Default
    <-- -->
    Sorted ascending
    cachemsg="..." Message shown when looking at a cached topic. Use $age to indicate the age of cache, $link to indicate the refresh URL CACHEMSG setting
    "..." or
    refresh="..."
    Cache refresh period in hours (maximum age of cache) REFRESH setting
    updatemsg="..." Message shown after a cache refresh. Use $link to indicate the refresh URL UPDATEMSG setting
  • Example: %VARCACHE{"168"}% caches the current page for 7 days
  • Exclude variables from getting cached:
    • Use <varcache_exclude> ... </varcache_exclude> to exclude sections of a page
      • Example: <varcache_exclude> %SEARCH{...}% </varcache_exclude> runs the search on every page view, regardless of caching
    • Or, prefix variables with VARCACHE_EXCLUDE_
      • Example: %VARCACHE_EXCLUDE_WIKIUSERNAME% renders the WIKIUSERNAME variable on every page view, regardless of caching
  • Category: AdministrationVariables, DevelopmentVariables
  • Related: VarCachePlugin, VarCachePluginTest
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.VarVARCACHE.