[wp-trac] Re: [WordPress Trac] #4097: get_pages: global page_cache not populated on cache retrieval

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 6 05:41:20 GMT 2007


#4097: get_pages: global page_cache not populated on cache retrieval
----------------------------+-----------------------------------------------
 Reporter:  kevinB          |        Owner:  rob1n
     Type:  defect          |       Status:  new  
 Priority:  normal          |    Milestone:  2.2  
Component:  General         |      Version:       
 Severity:  normal          |   Resolution:       
 Keywords:  get_page cache  |  
----------------------------+-----------------------------------------------
Comment (by kevinB):

 Replying to [comment:1 rob1n]:
 > why would you want to update the page cache if you retrieved the page
 successfully from the cache?


 The page was just retrieved from wp_cache; I'm talking about global
 $page_cache.

 I was thinking that $page_cache is always available as a memory resident
 cache for the php request, but that wp_cache is only available with
 ENABLE_CACHE.

 Now I see that even with DISABLE_CACHE, wp_cache will cache to memory.  My
 mistake.

 Maybe the real question here is why does global $page_cache exist at all?
 get_page_children is the only calling function.  Couldn't it call
 wp_cache_get($page_id, 'pages') instead?  On the other hand, if
 $page_cache is being retained there as a performance enhancement over
 wp_cache_get, it should be populated consistently.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4097#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list