Ticket #575 (closed defect: fixed)

Opened 7 months ago

Last modified 3 months ago

Cache bug

Reported by: MrBrian Assigned to: donncha
Priority: normal Milestone:
Component: component1 Version:
Severity: normal Keywords:
Cc:

Description

Latest rev 1213 does not seem to update the cache when changing themes. http://mu.wordpress.org/forums/topic.php?id=7876&page&replies=7#post-46579

To reproduce, stick this code in 2 themes or more. Then switch between the themes a few times to see the inconsistency of the cached value vs database value.

global $blog_id, $wpdb;

    	$key = $blog_id."-".'template'."-blog_option";
	$value = wp_cache_get( $key, "site-options" );
	echo 'Cached Key: '.$key.'<br/>';
	echo 'Cached Value: '.$value.'<br/>';
        
        $blogOptionsTable  = "wp_".$blog_id."_options";
	$blogtemplate = $wpdb->get_var("SELECT option_value FROM $blogOptionsTable WHERE option_name = 'template'");
        echo 'Actual Value in database: '.$blogtemplate;

Change History

04/18/08 16:12:01 changed by donncha

  • owner changed from somebody to donncha.
  • status changed from new to assigned.

As WP 2.5 remove the file cache completely this isn't an immediate concern, but we do need to make sure one of the memory based backends work well. I tested the memcached backend and it didn't seem to store anything for some reason!

04/18/08 16:21:20 changed by andrewbillits

I was working with the memcached backend the other day and it seemed to work ok except that when a blog option was changed the cache wasn't updated. That caused all sorts of problems like theme changes not working, etc.

04/18/08 16:52:12 changed by intoxination

I been testing Mark's APC object cache and it is working fine. I noticed one small bug, but it also appears in WP 2.5. If you go to edit a post and then hit refresh on the browser, the entities get double encoded. I haven't torn into the code enough yet, but I got a feeling the post is getting cached somewhere around the_editor, without checking for existing cache or clearing it out.

05/08/08 10:45:30 changed by donncha

I tested memcached and it's completely broken :(

(follow-up: ↓ 6 ) 05/08/08 11:04:36 changed by donncha

After restarting memcached it seems to work ok now. Must have been very stale data

(in reply to: ↑ 5 ) 05/08/08 23:55:28 changed by andrewbillits

Replying to donncha:

After restarting memcached it seems to work ok now. Must have been very stale data

Does anything funky happen when switching themes? That was the main problem with 1.3.3 and memcached.

Thanks, Andrew

05/08/08 23:58:19 changed by andrewbillits

The reason I ask that is that with 1.5 RC1 I was still having the theme issue. I'm just curious if anyone can confirm that it's working now.

Thanks, Andrew

07/11/08 14:35:06 changed by donncha

  • status changed from assigned to closed.
  • resolution set to fixed.

This is now fixed since the object cache code was overhauled.