JohnK Posted October 23, 2017 Share Posted October 23, 2017 Hey! When I was building a little commercial Processwire website for a family member, I started looking into caching with WireCache and somehow had troubles to find a satisfying solution to organize the caches and their expirations. My site had a few parts that updated in a regular manner while other parts should be refreshed whenever the current page - or e.g. for the menu: any page - was saved. I wanted to create a cache of the whole page's html which should expire whenever any of its parts expired. This would be simple if you could set multiple expire values for one cache. Unfortunately, you can only set one. So I started to build a solution to my problem which uses the WireCache and creates a dependency tree for every cache. And since I haven't yet implemented a Processwire module and this little class might be useful for other websites, too, I thought I'd try to make a module out of it. This is it. Github: https://github.com/janKir/CacheNesting Please have a look, and feel free to leave a comment. This is my first module, so any suggestions are welcome. I am not even sure if my approach makes much sense for performance reasons. I'm happy to hear your opinions! Thanks a lot! 16 Link to comment Share on other sites More sharing options...
ukyo Posted November 8, 2017 Share Posted November 8, 2017 I opened an issue on github and have a question. Did you try this module with multi language support ? If page have multi language support what's happening on cache naming side ? When i work languages with cache, adding user language id as suffix to cache name. Link to comment Share on other sites More sharing options...
JohnK Posted November 8, 2017 Author Share Posted November 8, 2017 No, I didn't try this. I have not worked with multi language so far, but I guess this wouldn't be too hard to add... 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