Add Transient Cache for Performance

  • 1 year, 5 months ago #31297

    Hi, where can we add code for transient cache ?

    wpsolr
    Keymaster
    1 year, 5 months ago #31298

    What is it?

    1 year, 5 months ago #31299

    Transients are types of cached data enabled in WordPress by the Transients API.
    Something like this code :
    set_transient( $transient, $value, $expiration );
    get_transient ( $transient );

    wpsolr
    Keymaster
    1 year, 5 months ago #31300

    But to do what?

    1 year, 5 months ago #31301

    to cache queries in some table, for faster response.

    wpsolr
    Keymaster
    1 year, 5 months ago #31302

    We do not use transients: there would be too many queries to cache, and a typical query takes a few milliseconds to execute.
    Most of the time is spent on the theme during the loop on post results.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.