Title: HTTPS Purge From Cache Not working
Last modified: August 31, 2016

---

# HTTPS Purge From Cache Not working

 *  [benno007](https://wordpress.org/support/users/benno007/)
 * (@benno007)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/https-purge-from-cache-not-working/)
 * 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/](https://wordpress.org/plugins/w3-total-cache/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [TIV.NET INC.](https://wordpress.org/support/users/tivnetinc/)
 * (@tivnetinc)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/https-purge-from-cache-not-working/#post-7136791)
 * Confirm the issue: HTTPS purge does not work.
 *  [Kimberly](https://wordpress.org/support/users/amiga500/)
 * (@amiga500)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/https-purge-from-cache-not-working/#post-7136795)
 * 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](https://wordpress.org/support/users/benno007/)
 * (@benno007)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/https-purge-from-cache-not-working/#post-7136796)
 * 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?
 *  [timmen22](https://wordpress.org/support/users/timmen22/)
 * (@timmen22)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/https-purge-from-cache-not-working/#post-7136864)
 * 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](https://wordpress.org/support/users/bappidgreat/)
 * (@bappidgreat)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/https-purge-from-cache-not-working/#post-7136865)
 * 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](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.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [total cache](https://wordpress.org/support/topic-tag/total-cache/)
 * [W3TC](https://wordpress.org/support/topic-tag/w3tc/)

 * 5 replies
 * 5 participants
 * Last reply from: [Ashok](https://wordpress.org/support/users/bappidgreat/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/https-purge-from-cache-not-working/#post-7136865)
 * Status: not resolved