Support » Plugin: W3 Total Cache » “Cache URIs with query string variables” with redis and nginx not working

  • Latest version WP and W3TC, running on NGINX server + redis
    page cache works, but when using query string, it fetches the dynamic page

    Any clue?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello
    requests with query strings are not cached by default. Add those you want to cache in Performance>Page Cache, Advanced sub-box “Accept query string” text area.

    Thanks!

    Yes, I’ve configured some query string parameters and it doesn’t work. For example, tried to use a single parameter “qtest”. Not working

    This should work with NGINX, right?

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,
    Sorry for the late reply.
    Can you please share what is in your debug.log when you add mentioned request?

    eddr

    (@eddr)

    Thanks!

    [25-Mar-2019 09:22:31 UTC] Connection refused
    [25-Mar-2019 09:22:31 UTC] PHP Notice: Undefined index: in /var/www/htdocs/wp-content/plugins/w3-total-cache/Cache_Redis.php on line 181
    [25-Mar-2019 09:22:31 UTC] Connection refused
    [25-Mar-2019 09:22:33 UTC] Connection refused
    [25-Mar-2019 09:22:33 UTC] Connection refused
    [25-Mar-2019 09:22:33 UTC] Connection refused

    eddr

    (@eddr)

    The connection test fails for some reason :\

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,

    This can also mean that Redis is not configured and W3 Total Cache can’t reach the server.
    Please check our FAQ page for Redis installation

    Thanks, working fine now

    I need to also clean these caches from redis programmatically – how do I do that given that I know what is the exact post ID and URL?

    thanks

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,

    You can use the code below for a specific post/page:

    if (function_exists('w3tc_flush_post')){
        w3tc_flush_post($post_id);
    }

    Thanks, but I talk about a URL with uri params. Does it work for this case? Will it flush the query params version

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.