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