I am using memcache with CakePHP.
I am running a multithreaded process which updates the memcache key.
So there is a 10% probability that two different processes end up updating the same memcache key, which throws an error.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can “lock” a key before setting it using code like the following.
This code assumes you have the Instrumentation-for-php library:
http://code.google.com/p/instrumentation-for-php
Just comment out the instrumentation lines if you don’t want to use it