[wp-trac] [WordPress Trac] #11405: add wp_cache_enable()/wp_cache_disable() methods
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 24 17:24:35 UTC 2009
#11405: add wp_cache_enable()/wp_cache_disable() methods
-------------------------------+--------------------------------------------
Reporter: Denis-de-Bernardy | Owner: ryan
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.0
Component: Cache | Version: 2.9
Severity: normal | Keywords:
-------------------------------+--------------------------------------------
Comment(by Denis-de-Bernardy):
I've been experimenting with a slightly different approach, when dealing
with the flush() method. The bug I was having was the following:
When I had my plugin disable the object cache from the admin screen, I
would flush. But after calling flush -- before the end of the page --
memcached would re-cache alloptions. When I'd re-enable the object cache,
the object cache's file would be around in WP_CONTENT_DIR but it would
show (as in the option) as disabled on the admin screen.
What I ended up doing was to add a flush variable in the object cache
class. When enabled, it would disable add(), set() and replace() until the
end of the page, while keeping delete() functional.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11405#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list