Question

I have a cache object (large json object) associated with a key. I would like to switch between this cache object / key instance and another without any down time in availability in one of the two.

I have been reading about memcached / spymemcached's CAS (compare and set) I feel as if this will allow me to swap between the two cache instance key pairs without any down time.

If so how can I implement the compare and set? Is there a code example using the spymemcached api to accomplish this?

Était-ce utile?

La solution

I created the value I want stored temporarily. When it is finished populating, I delete the old cache and swap.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top