• If you build your own themes and have never used the transient api, you should check it out.

    http://codex.wordpress.org/Transients_API

    If you have a side bar (or any part of your theme) with queries in it, it will speed up your site considerably

    For example, my categories are pretty much established at this point.

    $wp_list_categories = get_transient(‘wp_list_categories’);
    if ($wp_list_categories === FALSE)
    {

    // echo returns the value instead of printing it. THis is an option for most functions in WP.

    $wp_list_categories = wp_list_categories(‘echo=0’);

    // time is 3rd, 60 seconds x 60 minutes x 12 hours
    set_transient(‘wp_list_categories’, $wp_list_categories, 60*60*12);

    }
    echo $wp_list_categories ;

    While it does not replace caching plugins like W3-Cache it does really help speed up your site. I have it running for each of my side bar functions and it really sped thing up. Perfect for tag cloud, most comments, featured posts, etc.

    YMMV,

    Andrew

The topic ‘Super Awesome Caching Built into WordPress’ is closed to new replies.