[wp-trac] [WordPress Trac] #12446: "get_comments" transforms post id

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 4 13:08:59 UTC 2010


#12446: "get_comments" transforms post id
--------------------------+-------------------------------------------------
 Reporter:  jmabe         |        Owner:         
     Type:  defect (bug)  |       Status:  closed 
 Priority:  normal        |    Milestone:         
Component:  General       |      Version:         
 Severity:  normal        |   Resolution:  invalid
 Keywords:                |  
--------------------------+-------------------------------------------------

Comment(by Denis-de-Bernardy):

 try something like this, then:

 {{{
 $post->ID = time();
 while ( wp_cache_get($post->ID, 'posts')
   $post->ID += time();
 }}}

 also, don't forget to do the following on the shutdown hook, for memcached
 users:

 {{{
 wp_cache_delete($post->ID, 'posts');
 }}}

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


More information about the wp-trac mailing list