Monday Mar 23 2009 9:56 pm by Smokinn

My bug was in I had a script that ran forever. Whenever someone changed their info the object was reloaded in the script but the reloaded object was always keeping the old values.

A while back I noticed that on certain pages the majority of the time was spent talking to memcached. I then saw that the code was requesting the same keys over and over and over again. The quick fix was simply to add a static array in the Cacher class so that whenever a memcached get is called it first looks at that static array to see if the result is already there thereby saving a network round-trip.

Basically I put a cache in my cache so that I could cache my cache.

Comments
Post a comment
Name:
Email (optional):
URL (optional):
(Allowed tags: <a> <p> <strong> <em>)

Sorry, but due to spambots, to post I'll need you to prove you're human.

Of the six following animals, just select the two that are not fluffy

About the Site:

I might update. Don't hold your breath though.

About Me:

Name: Guillaume Theoret

Age: 841567616 seconds

Job: Mostly web dev

Some Friends:
Search:

RSS Feeds:

RSS