Opened 13 years ago
Closed 13 years ago
#15812 closed feature request (duplicate)
Introduce wp_suspend_caching
Reported by: | duck_ | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Cache API | Keywords: | has-patch |
Focuses: | Cc: |
Description
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 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.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Duplicate of #5389, which I've re-opened.