• Cache keys seem to be generated appropriately using W3TC when the website is in HTTPS (and you have the cache SSL pages set), but not when you click “Purge from Cache”.

    I have noticed that the logic for determining if the page is HTTPS is just plain wrong in the latest version 0.9.4.1

    W3\PgCache.php around like 960

    if ($request_uri)
    $key = substr($request_uri, strtolower(substr($request_uri, 0, 8)) == ‘https’ ? 8: 7);

    Substring of a request uri from 0 to 8 will *never* evaluate to “https” and thus deleting keys never works for https pages.

    It should be https:// or substring 0,5 instead.

    Also get_post_urls function in W3\SharedPageUrls.php needs to be updated. post_permalink($post_id) needs to be changed to get_permalink($post_id), as the former has been deprecated by wordpress.

    https://wordpress.org/plugins/w3-total-cache/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Confirm the issue: HTTPS purge does not work.

    Thanks for the heads up. Yea the author seems to be lazy or has abandoned this plugin 🙁 Although several of us already knew about the post_permalink deprecation and updated for it in our own forked versions i didn’t know about this https bug. Thanks. I will update my file.

    Curious, i assume when u fixed the bug in PGCache.php it still did not purge HTTPS? If not i will have to look into it further.

    Thread Starter benno007

    (@benno007)

    Hey Kimberly,

    Yeah I’m guessing the authors aren’t interested in updating it anymore which is a shame.

    When I fixed the bug in PgCache.php, purge from cache started working. It also started clearing the cache of the page when I published an edit or published a new post (which it wasn’t doing before either).

    Has this been forked on github at all do you know?

    Thanks for pointing out the flaw Benno007. Your solution is working. Nonetheless I still have an issue with purging the cache on query string pages.

    For example: domain.com/?utm=23u42

    It is impossible to purge the cache for the URL above. Does anyone know a solution?

    Thanks!

    Tim

    Ashok

    (@bappidgreat)

    Hello Tim

    I never tried that, but maybe this thread can help you: http://wordpress.stackexchange.com/questions/230725/w3-total-cache-use-cache-for-request-with-ignorable-query-string

    Also, this would be better if you create a new thread as the topic title is different than your issue 🙂

    Have a good day!

    Cheers
    Ash

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘HTTPS Purge From Cache Not working’ is closed to new replies.