Replies: 1 comment 1 reply
-
First of all, it seems wrong to use the datetime of the cache as the source for a last modified field. Caches may be deleted at any point (e.g. during maintenance or when you upgrade Smarty) and one wouldn't expect the dates in the sitemap to change because of that. That said, would it be feasible to implement a custom cache handler that wraps Smarty's default implementation and adds an extra method that returns the datetime when te cache was stored? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've got smarty code that loads dynamically into Wordpress based on URL rewriting (works as a single page in WP). I want to generate an XML sitemap for the dynamic content, ideally with lastmod element included. Cache key is a serialized 2 element associative array. I'd clearly have to change some other code to clear the cache using Smarty's methods. Meanwhile, there doesn't seem to be anything revealing filemtime from the internal cache handler. Any thoughts or ideas?
Beta Was this translation helpful? Give feedback.
All reactions