Mean, sick, and poor is no way to go through life, son.

I rule!

the client is rapt at the improvement in speed caused by the cache server :)  Now I just need to decide how much to charge him for the improvement...
Permalink worldsSmallestViolin 
September 3rd, 2006 8:08am
How did you implement the cache? Do you have good tutorials or URL's on it?

Be interesting to find out
Permalink what are you reading for? 
September 3rd, 2006 8:20am
"How did you implement the cache? "

its pretty basic.  I have a php file that is being queried by the remote clients, it in turn queries the database and creates an encrypted xml file with the results.
all I did was create an alternate php file identical to the original but that saves a compressed query/xml response/most recent query time set to a sqlite table each time it returns the result.

each request it receives it checks the table first for a matching request query, and returns that if it exists.

I have a cron job that runs every few minute, checks that same table and updates the xml responses for all the queries in the table, once the list of different queries gets above 50 it starts removing the oldest ones. there is actually a basic set of around 20-30 identical queries that the specific remote clients that require the caching use anyway, so mostly nothing will need to drop off at the moment.

I route the requests from certain remote clients through the cache server instead of through the standard one, and filter out the updates etc from the select requests.

"Do you have good tutorials or URL's on it? "

not really, its a pretty simple setup.  Im lucky in that I have a best case scenario for that type of caching...some of the other remote clients cannot use the caching because they perform more queries about specific records, or queries that are more dynamic...for those it actually makes a kind of sense to turn on the native mysql caching, but Im still thinking that one through.
Permalink worldsSmallestViolin 
September 3rd, 2006 8:39am
Whoa, cool!

Yeah I'm pretty clueless on caching and the like but that made sense, thanks for explaiing.
Permalink what are you reading for? 
September 3rd, 2006 9:42am
So you took my advice and put caching in the layer above the db?

No wait.. that was muppet...
Permalink Dash Riprock 
September 3rd, 2006 7:53pm

This topic is archived. No further replies will be accepted.

Other topics: September, 2006 Other topics: September, 2006 Recent topics Recent topics