Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 308 by [email protected]: version checked supported for
get/gets operation (suggestion)
http://code.google.com/p/memcached/issues/detail?id=308
There is a local cached in my application, and I use memcached as remote
cached. Does memcached support the feature like that ?
//Application code:
Object get(Object key){
CASValue local = localCached.get(key);
if(local != null) {
//remote.data was not transfered if local & remote have the same
version
//for reducing network traffic & enhancing performance
CASValue remote = remoteCached.get(key, local.getVersion());
if(remote.getVersion() == local.getVersion())
return local.getData();
else {
localCached.set(key, remote);
return remote.getData();
}
}
else
{
CASValue remote = remoteCached.get(key);
localCached.set(key, remote);
return remote.getData();
}
}
--
---
You received this message because you are subscribed to the Google Groups "memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.