[Mediawiki-l] Shorten Object/Client Cache time

Gregory Gross Gregory.Gross at avenuea-razorfish.com
Wed Jul 19 14:29:45 UTC 2006


Hello, 

 

For an extension I am creating, I need the object cache and client cache
to only be valid for a certain amount of time, say, 15 minutes. How
would I go about doing this? 

 

When the tag is parsed, I disable the client cache and add two member
variables to the parserOutput object, "shortExpTime", which is set to
the time it should expire and "shortCache" which is set to true (I know
this is a hack, that's why I am looking for an easier way). Then, in
ParserCache's get() function, if the shortCache is true and the current
time is greater than the shortExpTime, I delete the object from the
cache. 

 

This has broken action=purge somehow and I have no idea how to fix it.
If there is an easier way anyone is aware of please let me know. 

 

Thanks, 

Greg




More information about the MediaWiki-l mailing list