Hi guys, I have a problem in the CMS I'm currently writing.
I am using a custom, self-written template technique and I'm puzzled on how to use it in combination with caching. I currently have so-called "template bits", which are either database entries or flat files that contain HTML. The flat files might also contain PHP.
Now, what happens is that the template bits get parsed and put together into a single page. I would like to cache these pages, so that they do not have to be dynamically generated every time the page is called.
My question for you is about the naming scheme. How could I name the cache files to make sure their names are unique and retrievable? The template parser should know when a cached version of a page is necessary, but I an unsure how to implement this checking.
Do you have any suggestions on what the naming scheme for cache files could be? I was thinking something along the line of everything behind the ?-symbol, but I am worried about duplicate results with different content.
Any suggestions are appreciated.
- Peter







Bookmarks