[Typo3-dev] Plugin needs to be cached but sometimes not
Christoph Moeller
moeller at network-publishing.de
Fri Nov 26 17:06:52 CET 2004
Hi Michael,
Michael Stucki schrieb:
> This works fine but it usually occurs that the file contents change. So
> there needs to be some detection if the cache should be refreshed or not.
Hmmm. Add a DB field containing an MD5 hash as of "ls -alR | md5sum" of
the directory (might be slow) and have that one written to the DB (upon
every n-th access to the page), if changed. Accordingly, copy the old
MD5 value to another DB field for comparison. If md5_cur and md5_old
don't match, run $GLOBALS["TFSE"]->set_no_cache();
Not exactly sure whether Kasper's got some code in the core to check for
dir changes, already.
Practicability depends on the size of the dir, of course.
Happy weekend,
Chris
More information about the TYPO3-dev
mailing list