Jump to content

cache settings in development


Recommended Posts

When I do code changes, they are not displayed in the browser. Only when I change a content in the editor (for example a heading), save, clear the cache, the code changes will be displayed.
Is this normal? A wrong cache setting in the development?

Link to comment
Share on other sites

What kind of cache are you running?

  • Template Cache
  • ProCache
  • WireCache

In my opinion caching should be disabled during heavy development. Activate it for testing purposes only.

ProCache and Template Cache are both capable of such kind of caching you described. Even custom WireCache if done right/wrong. So... yes, it's normal in most cases.

For testing any development progress you should be logged into ProcessWire admin to have an active session - makes life much easier at least in the frontend.


  • Like 2
Link to comment
Share on other sites

1 hour ago, kaz said:

I run localhost:8888 with MAMP (Mac)

Unless things changed lately, MAMP activates OPCache by default. Make sure that the following settings are the same in your php.ini:

opcache.validate_timestamps     = true
opcache.revalidate_freq         = 0

Also check in MAMP config settings if caching is enabled for PHP (not sure if that option is still there, but with PHP 5.5, you could enable frontend caching).

  • Like 2
Link to comment
Share on other sites


I activated the lines in php.ini (php7.4.12), they were commented:


Settings: Cache was "off", I changed it to "OPcache", due to the change in php.ini

Unfortunately nothing changed. Changes will only be visible after a "save" in the editor.

I have installed a module, Cache Control. Even "clear all" makes no difference in the frontend. I guess I have to live with it.

Link to comment
Share on other sites

7 hours ago, kaz said:

Unfortunately nothing changed. Changes will only be visible after a "save" in the editor.

I'm not understanding this statement. Of course nothing you changed will be reflected until you save those changes.

You edit existing content.
Save those edits.
Refresh the browser.

Am I misunderstanding your goal?

Link to comment
Share on other sites


I meant code (css, php, …) changes, not content.
For example, if I try a change in the footer:
<footer class="bgcolor-secondary">
<section class="bgcolor-primary">
Nothing changed in the source code of the browser, in Safari, Chrome and Firefox. I clear the cache, no change, I restart the browser, no change.

I have used MAMP and MAMP Pro (demo). Because I couldn't find a better idea, I have deleted MAMP / Pro from the Mac, and installed XAMPP. I previously saved the layout with ProcessExportProfile. Then I reinstalled Processwire with that profile, and yes, now I see changes when I refresh the browser via cmd + r, it works!
I don't know why it behaved this way in MAMP, I worked with MAMP many years ago with ver. 1+2, I haven't used it since. In XAMPP it works now, so I simply forget about the problems with MAMP.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...