Skip to Content.
Sympa Menu

shibboleth-dev - Re: Shibboleth SP Session Cache

Subject: Shibboleth Developers

List archive

Re: Shibboleth SP Session Cache


Chronological Thread 
  • From: André Cruz <>
  • To:
  • Subject: Re: Shibboleth SP Session Cache
  • Date: Mon, 7 May 2007 10:21:17 +0100


On May 4, 2007, at 4:22 PM, Scott Cantor wrote:

You could store the version number separately and increment it with
the memcache methods but i think eliminating race conditions without
locks is next to impossible.

Yes, I think you're quite right.


I think we missed something. The add function, since it returns an error if the key is already set, can be used to create locks:

while ( ! memcache->add("LOCK:ID", 1) {
sleep();
}

# lock obtained
# fetch value and store new one

memcache->del("LOCK:ID");
# lock released


There... Locks. :)

André





Archive powered by MHonArc 2.6.16.

Top of Page