[wp-hackers] overriding the built-in cache

Mark Jaquith mark.wordpress at txfx.net
Fri Jan 6 01:48:31 GMT 2006


Probably better to just save the cache again after the shutdown hook  
is run.  If there's nothing to save, it should be really quick, and  
it's a shutdown function anyway, so it shouldn't contribute to page  
delay.  That would be the most backwards-compatible way of doing it.   
I thought about just moving the query save function to AFTER the  
shutdown hook, but that could be dangerous.  Shutdown functions don't  
output errors to the browser when they screw up, so they're hard to  
troubleshoot... and (at least, AFAIK) if you get a fatal error before  
the cache is saved, you lose the changes that were made.  So my vote  
goes to sandwich the shutdown hook between two cache saves.

On Jan 5, 2006, at 8:39 PM, Owen Winkler wrote:

> Would it be useful to sneak another hook in before the cache gets  
> written to disk?  Say, 'pre_cache_close'?

--
Mark Jaquith
http://txfx.net/




More information about the wp-hackers mailing list