Make a button called Caching in the admin panel. Allow users to make a new cache file, add the code they want to run (such as a toplist) and specify how often they want this to be executed (an option to allow execution whenever a link, category, etc is added or edited would be great also)
Allow the user to insert the cached query in their templates with something like
[INSERTCACHE=mainnewstatic] Seperate the cache content into a cache directory (to keep from bastardizing the static file generation process) and because thats what everyone else does.
Strip comments, so that users can cache category calls on the main page. (and perhaps even the displaylinks query if you could work out the pagination.)
Generate the caches in sequence (like the regenerate area) so that the 30 second time limit isn't a problem for users who cache several queries.
Caching queries to files was tried a few years back and turned out to be considerably slower than mysql -- especially mysql4+, which already has its own query caching mechanism built-in. I won't be doing that again.
Caching the entire result of a toplist would speed things up, but of course the data would be 12 hours old. This is possible already -- put the toplist in a custom template, static generate that url, use [INSERTFILE= to call it where it should be displayed. Simplification of the process is a possibility but not a high priority.
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Cache system
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
Paul,
As requested by mrowton within https://www.webmastersite.net/forums/thread/1891
Make a button called Caching in the admin panel. Allow users to make a new cache file, add the code they want to run (such as a toplist) and specify how often they want this to be executed (an option to allow execution whenever a link, category, etc is added or edited would be great also)
Allow the user to insert the cached query in their templates with something like
[INSERTCACHE=mainnewstatic]
Seperate the cache content into a cache directory (to keep from bastardizing the static file generation process) and because thats what everyone else does.
Strip comments, so that users can cache category calls on the main page. (and perhaps even the displaylinks query if you could work out the pagination.)
Generate the caches in sequence (like the regenerate area) so that the 30 second time limit isn't a problem for users who cache several queries.
I would like to ask for this same feature
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Caching queries to files was tried a few years back and turned out to be considerably slower than mysql -- especially mysql4+, which already has its own query caching mechanism built-in. I won't be doing that again.
Caching the entire result of a toplist would speed things up, but of course the data would be 12 hours old. This is possible already -- put the toplist in a custom template, static generate that url, use [INSERTFILE= to call it where it should be displayed. Simplification of the process is a possibility but not a high priority.