Quote:
Originally Posted by Sheriff Ice
Great class im using it, its impressively amazing, reduced the load time dramatically
|
Indeed, i'm using it on multiple websites and has been doing great so far.
However, this class is made for mass page caching and works great for news and blog websites, but it breaks when you have client interaction where results are supposed to be different for each client and an SQL caching system is required.
Therefore i thought about developing a more advanced class where it caches SQL results and pops them up if query encryption matches instead of placing an SQL request each time.
for example:
// Simple SQL query
Code:
select * from users where id = 32
// What the system actually does before running the query:
- Encrypt it, add client session or id to it "32541_00000ad589174863012860b04aae75cd" let's say and check if it exists in the cache. If it does just load it, if it doesn't:
Proceed with the SQL query, get the result > serialize it > cache it.
The difference in such caching system and the above is that leaving room for dynamic queries every minute have way more effect than the above system for a simple reason: Each client results of custom queries unlike a news website where a news-load query almost never changes.
Therefore the cache should be cleared upon modification (update,delete) only.
When the record is updated you simple clear the cache of 32541_*
Will post the class when developed.