r2 - 15 Feb 2006 - 06:55:57 - PeterThoenyYou are here: TWiki >  Codev Web > PoorManCache
Tags:
, create new tag

Poor-man Cache

A simple way of caching plugin execution is shown in the PrologPlugin.

We use two tags:

  • XXX for normal execution at view time
  • SAVEXXX for caching at save time the execution

In commonTagsHandler:

  • we handle normally the %XXX{<args>}% tag
  • we visualize the cached value ( <result> ) stored in %SAVEXXX{<args> cachedvalue="<result>"}%
In beforeSaveHandler:
  • we transform the %XXX{<args>}% tag to %SAVEXXX{<args> cachedvalue="<result>"}%
In beforeEditHandler:
  • we transform back the %SAVEXXX{<args> cachedvalue="<result>"}% tag to the XXX{<args>} form for edit

-- AndreaSterbini - 21 Aug 2003

 
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback SourceForge.net Logo