kaz Posted May 5, 2021 Share Posted May 5, 2021 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 More sharing options...
wbmnfktr Posted May 5, 2021 Share Posted May 5, 2021 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. 2 Link to comment Share on other sites More sharing options...
rick Posted May 5, 2021 Share Posted May 5, 2021 For the front-end, I use the header meta cache directives to disable the browser cache during development. I can comment them out to test caching See this link for more info. 2 Link to comment Share on other sites More sharing options...
kaz Posted May 5, 2021 Author Share Posted May 5, 2021 @wbmnfktr I just use the CMS without any changes to the cache. @rick Great, I will try the no-cache for the time of development. Link to comment Share on other sites More sharing options...
wbmnfktr Posted May 5, 2021 Share Posted May 5, 2021 So... you didn't activate or use any kind of cache? Then @ricks solution might work for you. Another thing... are you using Opera? That thing annoys me with cache issues each and every time I use it. Link to comment Share on other sites More sharing options...
elabx Posted May 5, 2021 Share Posted May 5, 2021 Maybe some sort of server cache layer? Are you working local or on a server? Last but not least, the cache on your developer tools. Link to comment Share on other sites More sharing options...
kaz Posted May 6, 2021 Author Share Posted May 6, 2021 @elabx I run localhost:8888 with MAMP (Mac). I don't use developer tools, it is a simple PW blank installation. Link to comment Share on other sites More sharing options...
BitPoet Posted May 6, 2021 Share Posted May 6, 2021 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). 2 Link to comment Share on other sites More sharing options...
kaz Posted May 6, 2021 Author Share Posted May 6, 2021 @BitPoet I activated the lines in php.ini (php7.4.12), they were commented: opcache.validate_timestamps=1 opcache.revalidate_freq=0 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 More sharing options...
rick Posted May 6, 2021 Share Posted May 6, 2021 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 More sharing options...
kaz Posted May 7, 2021 Author Share Posted May 7, 2021 @rick I meant code (css, php, …) changes, not content. For example, if I try a change in the footer: <footer class="bgcolor-secondary"> to <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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now