Add Transient Cache for Performance

  • prakashreddy.imduri
    Participant
    1 month, 3 weeks ago #31297

    Hi, where can we add code for transient cache ?

    wpsolr
    Keymaster
    1 month, 3 weeks ago #31298

    What is it?

    prakashreddy.imduri
    Participant
    1 month, 3 weeks 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 month, 3 weeks ago #31300

    But to do what?

    prakashreddy.imduri
    Participant
    1 month, 3 weeks ago #31301

    to cache queries in some table, for faster response.

    wpsolr
    Keymaster
    1 month, 3 weeks 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.