• Resolved Carsten Lund

    (@carsten-lund)


    Hi there, I have been suggested to disable query-caching in WordPress core in connection with using Redis object cache. Nevertheless I have not seen this suggested else were. So my question is, if you have any knowledge about what should be the purpose of doing that. Is Redis cache faster without it?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @carsten-lund

    Thank you for reaching out and I am happy to assist you with this.

    Can you please share if you are using Object Caching via W3TC or using Redis Object Cache?
    Also, please share where you got the suggestion from and what is it related to.

    Thanks!

    Thread Starter Carsten Lund

    (@carsten-lund)

    Hi @vmarko, thanks for getting back to me. I got the suggestion from the plugin author of Redis Object Cache.

    I just added Redis to my server and hav tried both Redis Object Cache and W3TC.

    I had an 404 error on my frontpage after a while of running Redis, but this disappeared by adding a page cache plugin as well. I will try with W3TC alone to see if the 404 error on my frontpage disappears.

    I got this code snippet to disable query-caching in WordPress core, but no clarification on why and how:

    add_action( 'parse_query', function ( $wp_query ) {
       $wp_query->query_vars['cache_results'] = false;
    } );

    I also received this article but didn’t understand much of it.

    Improvements to WP_Query performance in 6.1

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @carsten-lund

    Thank you for your feedback.

    This is not available in the W3TC, however, as it’s suggested in the mentioned post, you can add it manually. If this is suggested by the author of Redis Object Cache, you should address the “why” question to them,. This being said, you should not be using both Redis Object Cache and W3TC Object Cache at the same time.

    I hope this helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redis – disable query-caching in WordPress core’ is closed to new replies.