[wp-trac] [WordPress Trac] #11405: add wp_cache_enable()/wp_cache_disable() methods

WordPress Trac wp-trac at lists.automattic.com
Sun Dec 13 23:15:58 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):

 oh the issue is about limiting the amount of memory consumed while
 generating a sitemap xml file.

 basically, I query each and every last post, for only one purpose: to
 generate a permalink. not all fields are needed for this. in particular
 the excerpt and content, which are expensive to retrieve. so I add a
 filter to the posts fields, in order to stick to those that could be
 needed.

 I then update_post_cache() the mess so that get_permalink() doesn't cause
 tremendous numbers of queries, since that also tends to be resource
 intensive. and this is the part where I end up with issues: any post that
 isn't already in memcached ends up with junk.

 In the update I'll be releasing, I'm fixing this by marking the posts and
 postmeta buckets as temporary, and it's working fine as far as I can tell.
 so safely close as wontfix if you think it's not needed.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11405#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list