Tags:
create new tag
, view all tags

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 | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2006-02-15 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.