[wp-trac] [WordPress Trac] #16927: Don't use XHR to load portions of Dashboard that are "hot" in the cache

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 22 06:57:39 UTC 2011


#16927: Don't use XHR to load portions of Dashboard that are "hot" in the cache
------------------------------------+--------------------------
 Reporter:  markjaquith             |       Owner:  markjaquith
     Type:  task (blessed)          |      Status:  accepted
 Priority:  normal                  |   Milestone:  3.2
Component:  Performance             |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+--------------------------
Changes (by markjaquith):

 * keywords:  needs-patch => has-patch dev-feedback
 * owner:   => markjaquith
 * status:  new => accepted


Comment:

 First attempt. Results in massively more fluid loading experience, and an
 overall faster load time.

 Sidenote: should we have a fragment caching helper in core? I use code
 like this:

 {{{
 $fragment = new WP_Fragment_Cache( 'some_key', $ttl);
 if ( !$fragment->echo() ) {
    echo "foo";
   $fragment->save();
 }
 }}}

 The echo function echoes if the cache is hot, else it starts the ob. And
 save() does ob_get_flush() and a cache set. Makes it pretty simple.

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


More information about the wp-trac mailing list