Jump to content

Template cache not getting deleted


Soma
 Share

Recommended Posts

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

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

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 :D

  • Like 2
Link to comment
Share on other sites

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... :huh:

Link to comment
Share on other sites

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 :)

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

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

  • 4 weeks later...

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
 Share

  • Recently Browsing   0 members

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