[wp-hackers] Bizarre /cache/ experience with wp_object_cache.lock

Mark Jaquith mark.wordpress at txfx.net
Fri Feb 3 05:26:16 GMT 2006

I just had a rather strange experience with the object cache.  I just  
moved my site to a new server, and I deleted the contents of the /wp- 
content/cache/ directory before moving.  At the new host, I was  
getting 80+ queries on my front page (redundant option hits).  I  
chown/chmod'd my /cache/ directory into oblivion... I was confident  
that I had it set correctly... but nothing.  Then, out of  
desperation, I started moving files from another WP install's cache  
into my cache.  Once I moved wp_object_cache.lock into my /cache/  
directory, it started working.

I took out all the error suppressing @s from /wp-includes/cache.php  
in an effort to try to get it to throw an fopen() error, but it  
didn't make a peep.  If /cache/ wasn't there, it wouldn't be created,  
even though the permissions were set up so that it could.

Why can't WordPress create this file?  Why wasn't WordPress reverting  
to the old caching method (i.e. select all options where autoload =  
'1' and store them in memory for that load)?

Debian 3.1
PHP4 as Apache2 module
Safe Mode OFF
Mark Jaquith

More information about the wp-hackers mailing list