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();
}
}
Original issue reported on code.google.com by tim.wong...@gmail.com on 1 Feb 2013 at 3:47
Original issue reported on code.google.com by
tim.wong...@gmail.com
on 1 Feb 2013 at 3:47