• 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 Contributor 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.

    Thread Starter eddr

    (@eddr)

    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 Contributor Marko Vasiljevic

    (@vmarko)

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

    Thread Starter 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

    Thread Starter eddr

    (@eddr)

    The connection test fails for some reason :\

    Plugin Contributor 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

    Thread Starter eddr

    (@eddr)

    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 Contributor 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);
    }
    Thread Starter eddr

    (@eddr)

    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)
  • The topic ‘“Cache URIs with query string variables” with redis and nginx not working’ is closed to new replies.