[wp-trac] [WordPress Trac] #15812: Introduce wp_suspend_caching
WordPress Trac
wp-trac at lists.automattic.com
Tue Dec 14 15:10:29 UTC 2010
#15812: Introduce wp_suspend_caching
-----------------------------+----------------------------------------------
Reporter: duck_ | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Cache | Version:
Severity: normal | Keywords: has-patch
-----------------------------+----------------------------------------------
There are some occasions when it may be beneficial to temporarily disable
object caching (just adding objects to the cache).
'''Example'''
I was doing some testing/profiling of large WXR imports and I noticed
calls to wp_cache_add for every single post being imported (from
wp_import_post -> get_post -> wp_cache_add). However, for the rest of the
import these posts are not queried again making their existence in the
cache redundant and using up a lot of memory unnecessarily. See
[http://pastie.org/1376186 this paste] for my quick figures (from
$wp_object_cache->stats() and memory_get_peak_usage) from local testing...
tl;dr is ~199MB -> ~124MB memory usage for no increase in cache misses
when importing 10000 posts.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15812>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list