View Single Post
Old 09-19-2010   #8
xcoder
Ma ghayro
 
xcoder's Avatar
 
Last Online: 04-19-2018
Join Date: Dec 2005
Posts: 5,592
Thanks: 1,765
Thanked 4,201 Times in 2,361 Posts
Groans: 12
Groaned at 18 Times in 11 Posts
Default

Quote:
Originally Posted by Sheriff Ice View Post
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.
__________________
http://twitter.com/danymoussa
xcoder is offline   Reply With Quote