unable to invalidate objects from memcached

Raj Bala rajbala at gmail.com
Mon Oct 22 19:15:01 UTC 2007


Hi,


We are having problems invalidating objects from memcached.

We are using the following code to delete cached data from memcached:


MemCachedClient mc = new MemCachedClient();

mc.setPoolName(Constants.MEMCACHE_POOL);

mc.setCompressEnable(true);

if(mc.get(memKey)!=null)
{
    boolean flag = mc.delete(memKey);
}

This code works well when I try to delete cached object from the same
machine, but it doesn't work when I try to delete it from a remote
machine.  When we try to delete cached objects from a remote machine
then either it doesn't get a key or returns false.

Any idea on what the might be problem?

Thanks,

Raj


P.S.

One of our guys has been trying to send this question to the list for
a few days, but it's not showing up for some reason.  Apologies if it
eventually does.


More information about the memcached mailing list