Soma Posted December 3, 2013 Share Posted December 3, 2013 Anyone has good experience with template caching? I have set the cache for a template, and set the page to clear cache on save and all parents above including homepage. When I save a page I get the message like: Session: Cleared cache file: /home/.../site/assets/cache/Page/1040/1040.cache But the file on server is still there! And the file is not /1040/1040.cache but /1040/4c81f131016c84203e1525aef538e4ed.cache Further more I don't see a message for the current page I save, that the cache file gets deleted, which is confusing again. So when I view the page 1040 which is a parent page I still get the cached file. Permissions are not a problem on server at all and I'm confused and lost to why it doesn't work. Any ideas? Once it would work: Apart from that: How does this work when I save the page via API? Would it also delete all the cache files according to the cache setting? Link to comment Share on other sites More sharing options...
Soma Posted December 3, 2013 Author Share Posted December 3, 2013 Template caching seems to be just borked... I let PW create a cache file: It is created correctly /5055/4c81f131016c84203e1525aef538e4ed.cache Soo far so good. I go to save the page 5050 (id) and there's no deleting happening, not even a message (only for parent pages, but they don't actually get deleted..) I go to the server and rename the file to: /5050/5050.cache then go to save the page again in admin, and suddenly the 5050.cache gets deleted correctly! So has anyone got template cache working at all or is using it? This is using latest PW dev. Edit: I'm using language support with 3 languages, and I can see it's creating cache for each language like: 4c81f131016c84203e1525aef538e4ed.cache 4c81f131016c84203e1525aef538e4ed_1013.cache 4c81f131016c84203e1525aef538e4ed_1014.cache Also I noticed that the cache files time on the server is 1 hour behind of what a timestamp in php would return. Link to comment Share on other sites More sharing options...
Soma Posted December 3, 2013 Author Share Posted December 3, 2013 Ok. Coincidence, as there was an dev update just an hour before I posted this thread which seem to fix this cache problem for me. Will test a litte more but definately the cache gets deleted now correctly it seems 2 Link to comment Share on other sites More sharing options...
ryan Posted December 11, 2013 Share Posted December 11, 2013 Pete tracked it down and I put in a fix. The problem was actually related to the prependTemplateFile / appendTemplateFile options not being properly identified in the cache. 1 Link to comment Share on other sites More sharing options...
icietla Posted December 18, 2013 Share Posted December 18, 2013 Hello, I have a problem with the cache in 2.3.8 version. Logged as admin, sometimes (but not rarely) when I reload a page after a modification of code templates, the modification is not visible. I have this old version of my code. I have disabled the cache for templates and I know that it don't work when we are logged. This is not a problem of browser cache and there are no files in asset/caches/... So I have to wait before seeing my modification and continue my developments. I don't know where is stocked the page I see when I reload! Strange... Link to comment Share on other sites More sharing options...
teppo Posted December 19, 2013 Share Posted December 19, 2013 Sounds like your web host has some sort of caching enabled -- if you're using managed hosting, web hotel etc. I'd suggest taking a look at the help materials available and possibly asking the administrator(s) what could cause this. If you're hosting yourself.. well, you should know best what's installed and running 1 Link to comment Share on other sites More sharing options...
Moebius Posted October 10, 2015 Share Posted October 10, 2015 This is pretty old post, but I'm experiencing exact same problem as icietla, ProcessWire 2.6.1 © 2015. If its not Processwire, anybody know what should I look first? As addition, this is not happening always but ocasionally. Link to comment Share on other sites More sharing options...
Moebius Posted November 8, 2015 Share Posted November 8, 2015 In my case, cache problem occured because my hosting plan had "Run PHP as: FastCGI application". After they changed to "Apache module" problems are gone. 2 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