I am imitating the MemCachedState class found here:
https://github.com/nathanmarz/trident-memcached/blob/master/src/jvm/trident/memcached/MemcachedState.java
.

I was wondering what the CachedMap is used for. I see that it creates a
cache layer between the final datastore in order to retrieve values much
quicker than accessing the datastore every time, however I am unsure about
a couple details.

Is this cache replicated among all hosts? When I do a 'multiGet' I expect
to retrieve data I had previously stored. If the cache is specific to each
host, I wouldn't necessarily get the same data I had most recently stored.

Also, how does this work with Opaque Transactional consistency? It seems
that in the MemCachedState example we serialize the data once we store it
to the external datastore, however the data in the cache is not serialized.
why is this?
Shouldn't the local cache have the same data as the external datastore ?

thanks
-- 
Raphael Hsieh

Reply via email to