Lesti_Fpc icon indicating copy to clipboard operation
Lesti_Fpc copied to clipboard

add an option for flush the cache of concret url

Open kek0 opened this issue 10 years ago • 7 comments

Hi!

This is a suggestion for add an option in the admin panel for flush the cache regarding about concret url.

This method is used in CDN like cloudflare, and is very good for only delete the cache related for example with one product or one cms, and no need to delete the previous cached products/cms, etc.

thanks.

kek0 avatar Aug 20 '13 08:08 kek0

I second this suggestion. What would be even nicer would be to allow a page to be flushed and refreshed by attaching a uri parameter like http://www.example.com/example/example.html?refresh=1 . Then we would be able to use something like http://patrickmylund.com/projects/ocp/ to do rolling updates of the cache by simply visiting every page (with the refresh parameter appended) in a sitemap or filtered sitemap. As long as the pages were visited at a reasonable rate(or even only when CPU/database load is low), we could have a nice solution for priming the cache.

RIght now, I have a cron job that runs every few hours that flushes the cache completely and then visits the first page of every category and every cms page to prime the cache. It puts a moderate load on my application servers and database for 3-4 minutes (I have a lot of categories), but it is definitely worth it. I originally planned to also prime the cache with every product page, but I soon realized it would take 3-6 hours to prime the cache(it takes between 1-4s to load an uncached page on my site), and during that time, the entire site would be noticeably slower for real visitors. There was also the problem that if I flush the cache every 6 hours, then the last page primed would only be primed for 0-3 hours, depending.

Sorry for the long answer, but my point is I second this suggestion. Even if it would only be accessible through admin, even a php novice like myself would be able to use it to set up a cache priming script.

ThePhilLee avatar Aug 22 '14 03:08 ThePhilLee

It would be great to have this feature. +1

VladanZ avatar Oct 01 '14 12:10 VladanZ

What if your competitors find this feature? You should add something like an auth_key.

GordonLesti avatar Oct 02 '14 06:10 GordonLesti

It was ment as a feature in admin backend Cache management similar to Varnish module from Phenix. Dne 2. 10. 2014 8:54 "Gordon Lesti" [email protected] napsal(a):

What if your competitors find this feature? You should add something like an auth_key.

— Reply to this email directly or view it on GitHub https://github.com/GordonLesti/Lesti_Fpc/issues/20#issuecomment-57590968 .

VladanZ avatar Oct 03 '14 20:10 VladanZ

This has been done? It would be awesome..

imsergiobernal avatar Jul 29 '16 21:07 imsergiobernal

+1

Webmasterei avatar Jul 31 '16 11:07 Webmasterei

Flushing the cache for an uri is in general no possible at the moment. Possible would be flushing by a tag for example product_5. But that is also triggered after saving a product.

GordonLesti avatar Jul 31 '16 12:07 GordonLesti