Do you have a question? Post it now! No Registration Necessary. Now with pictures!
March 31, 2008, 1:22 am
rate this thread
Question, I am writing a basic community software suite that takes
advantage of memcache for scalability.
I have 2 public arrays that store user profile data, each array is
populated from the constructor from the system cache.
My issue is this, one of the arrays of data contains information about
a user. Example: Johnny and his favorite color is black, apart of the
software is for the user to update there information, doing so it will
update the database and the system cache. The issue lies in with
updating the system cache .. example
$foo = $memcache->replace('JohnnysFavColor','white',false,600);
the problem is with re-setting the expired time.
If there is no value it will set it to never
and if you set it at 600 it will reset it back starting from 0.
My issue is i need for it to continue the original ttl set at the
first creation of the key, so let say it was creating 200 secs before
the update i need for it to be remaining 400 secs left rather then
setting it back to 600.
Is there a way to find the current secs left on an item before
Or a flag to pass to let it know not to update the expired time.