You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to purchase the warm cache plugin but have some questions.
I have a single instagram like page with a 1000+ high quality images. I am actually quite surprised how well this works, they load very very fast still. There is only one problem. When I do an CMS update, cache is emptied. When loading the photo page afterwards it runs out of memory a couple of times before the page finally loads. In the admin panel it also takes forever for the page with attachments thumbnails to load. Now I can make sure the cache doesn’t get deleted by renaming the folder during update but that is a hassle.
My photo page is behind a login.
My questions:
will this work behind a login?
if it runs out of memory, will this halt the caching process altoghether?
Any other ideas how to handle this are very welcome as well.
Warm cache uses the sitemap and then iterates over the pages it finds, and simply using a web crawler to hit the page (therefore causing any images to be processed and cached). If you have a page that is protected by the login plugin, warm cache will get blocked by the login form just like a regular user.
I can envision a couple of ways to get around this.
create a dummy page with the same images, that is an obscure unguessable URL. Make sure its routable, but also configure it so that it's ignored by the sitemap. You could even add a rule in your webserver or firewall (or cloudflare if you use it) to block all access to this page except for the browseragent associated with Grav's sitemap crawler.
create a custom plugin that hooks into the login event hooks and checks the sitemap crawler's browser agent and automatically gives access if that agent is found. Can customize the broser agent string in the sitemap plugin to pick something secure.
Both of these are non-trivial, in that they will need some setup and/or some simple programming skills i'm afraid. Anything is possible, but not everything is possible in a nice GUI way of doing things..
The other issues about timesouts and memory can be offset by increasing both in your php.ini file.. but other than that, the only way to handle things is:
a) use another service to resize the images (like imagekit, cloudflare images, etc).. these 3rd party image resizing services will not impact the performance of Grav at all as they resize dynamically with each image request.
b) break up your output so that you don't show 100 at a time, only show 20 perhaps, then paginate the rest. If you are using instagram feed plugin, it maybe possible to modify the Twig and add some JS to to paginate results. I've not and the need to do this before, so i'm just spitballing.
Hi,
I would like to purchase the warm cache plugin but have some questions.
I have a single instagram like page with a 1000+ high quality images. I am actually quite surprised how well this works, they load very very fast still. There is only one problem. When I do an CMS update, cache is emptied. When loading the photo page afterwards it runs out of memory a couple of times before the page finally loads. In the admin panel it also takes forever for the page with attachments thumbnails to load. Now I can make sure the cache doesn’t get deleted by renaming the folder during update but that is a hassle.
My photo page is behind a login.
My questions:
Any other ideas how to handle this are very welcome as well.
Info setup
VPS 4 cores | 8 GB
Ubuntu 22.04 / Docker / Ngninx proxy manager
Grav v1.7.46 - Admin v1.10.46
Login plugin v3.7.9
The text was updated successfully, but these errors were encountered: