Disable cache on mobile phones

Hello,

When I make changes to a page with cache disabled, the changes are not displayed on mobile devices. From a desktop sometimes it also fails. This happens with cache disabled from the system settings, from the page (cache_enable: false) and even after activating the “Clear cache” button in the side menu of the admin panel.

The changes consist of a change of a photo or a line of text.

It is probably more a lack of knowledge on my part than a Grav problem. As the Grav configuration is so extensive, I guess I’ve made a mistake with the configuration.

I have looked at the documentation and it doesn’t give me much clarification, as I find descriptions similar to those in the panel itself. I have also seen that the configuration options are not exactly the same, so it could be that the documentation is a bit out of date.

Can anyone tell me what settings I should have to ensure that I have completely disabled the cache?

Thank you very much.

disable the cache as a whole is real bad thing to do

Is this a live server or a local development machine ??

If it is a local development machine, you can use the following things

Ensure that your cache setting in the system.yaml is to set to file
and whilst testing a page in the front matter of that page

cache_enabled: false

which attempts to stop the page caching at a page level.

(More for desktop testing of a page)
Also in your browser , if you go to developers tools, and network, there is a “disable cache” setting, which will always force the page to be fetched and no cache version is used, whilst the inspect windows is open

HTH

Thanks @spamhater

Working without cache during web development is not a problem for me. However, I have already set cache_enable: false on the page.

I need to disable the cache on some pages because when their content is updated it has to be modified instantly (a modification of the schedule of a business, for example).

Yep I kind of do the same, and jumping from browser to browser.
You can set in admin for caching not to happen overall, and there is separate frontmatter commands to do this at a per page level

You even have a script running just deleting the root grav install cache folder as cli

Usually what you are asking , is the reverse of what makes grav, well GRAV … lol
disable any php.ini cache loaders at a system level
at grav level disable cache in the system.yaml via editing or using admin with the link as a reference

you can set it to none so to try and stop php caching (from php.ini cache services)

but you setting grav system at a file level, should be good enough for development

further on you can disable twig caching, with grav

then command line level bin/grav cache as a schedule tasked

You will have caching of twig and data , so using the frontmatter on a page level cache_enabled: false

Then you just do a a hard page refresh SHIFT-F5 most browsers or open the browsers devtools/inspector and go to network and disable the browser cache, whilst the inspector is open … and that will stop it at that level

Usually I try and leave it enable on Grav, but setting to file, then have a ramdrive with my webpage cache on it, so easy to get rid of, plus really speeds up the dev experience … and I try and use portable browser, which are sitting of a ramdrive, with an autosync of the critical browser stuff, and their caches with browser switches

My method only works, because I have an APC and 64 GB of ram , so have about an 8 GB ramdrive for windows temp and browser caches being saved in their own directories, saves on thrashing my SSD drive. Then my ramdisk every 5 mins has a task to just sync files of without the temp files / junk. In theory the worst that could happen i loose about 5-10 mins work… when windows spits it dummy out !

Also useful tools for a browser in a extension, which clean the cache and refreshes the page
I like this one for chome based / mozilla browsers the dev is here hxxps://disbug.io/en/app/clear-cache

Then you got a button that dump the browser cache and refresh the page in a single click

Just depends how well you need to scrub up and the hardware you have accessible. :slight_smile: