@Test public void testDelete() { String key = MemCacheUtil.toKey("123", "module.c"); MemCacheTemplate<String> memCacheTemplate = getMemCacheTemplate(); if (memCacheTemplate.set(key, "dsadsadsadsadas")) { String value = memCacheTemplate.get(key); Assert.assertEquals("dsadsadsadsadas", value); memCacheTemplate.delete(key); value = memCacheTemplate.get(key); Assert.assertEquals(null, value); } }
@Override public boolean delete(String key) { boolean rs = delete(key, master); if (rs == false) { return rs; } if(slave != null){ delete(key, slave); } delete(key, masterL1List); delete(key, slaveL1List); return rs; }
MemCacheTemplate implements CacheAble<T> { @Override public boolean delete(String key) { boolean rs = delete(key, master); if (rs == false) { return rs; } if(slave != null){ delete(key, slave); } delete(key, masterL1List); delete(key, slaveL1List); return rs; } }
MemCacheTemplate implements CacheAble<T> { @Override public boolean delete(String key) { boolean rs = delete(key, master); if (rs == false) { return rs; } if(slave != null){ delete(key, slave); } delete(key, masterL1List); delete(key, slaveL1List); return rs; }  }
MemCacheTemplate implements CacheAble<T> { @Override public boolean delete(String key) { boolean rs = delete(key, master); if (rs == false) { return rs; } if(slave != null){ delete(key, slave); } delete(key, masterL1List); delete(key, slaveL1List); return rs; }  @Override T get(String key); @Override Map<String, T> getMulti(String[] keys); @Override boolean set(String key, T value); @Override boolean set(String key, T value, Date expdate); @SuppressWarnings("unchecked") @Override CasValue<T> getCas(String key); @Override boolean cas(String key, CasValue<T> casValue); @Override boolean cas(String key, CasValue<T> casValue, Date expdate); @Override boolean delete(String key); void setExpire(long expire); void setExpireL1(long expireL1); Date getExpireTime(); Date getExpireTimeL1(); MemcacheClient getMaster(); List<MemcacheClient> getMasterL1List(); MemcacheClient getSlave(); List<MemcacheClient> getSlaveL1List(); boolean isSetbackMaster(); void setMaster(MemcacheClient master); void setMasterL1List(List<MemcacheClient> masterL1List); void setSlave(MemcacheClient slave); void setSlaveL1List(List<MemcacheClient> slaveL1List); void setSetbackMaster(boolean setbackMaster); boolean isMasterAsOneL1(); void setMasterAsOneL1(boolean masterAsOneL1); String getWirtePolicy(); void setWirtePolicy(String wirtePolicy); }
MemCacheTemplate implements CacheAble<T> { @Override public boolean delete(String key) { boolean rs = delete(key, master); if (rs == false) { return rs; } if(slave != null){ delete(key, slave); } delete(key, masterL1List); delete(key, slaveL1List); return rs; }  @Override T get(String key); @Override Map<String, T> getMulti(String[] keys); @Override boolean set(String key, T value); @Override boolean set(String key, T value, Date expdate); @SuppressWarnings("unchecked") @Override CasValue<T> getCas(String key); @Override boolean cas(String key, CasValue<T> casValue); @Override boolean cas(String key, CasValue<T> casValue, Date expdate); @Override boolean delete(String key); void setExpire(long expire); void setExpireL1(long expireL1); Date getExpireTime(); Date getExpireTimeL1(); MemcacheClient getMaster(); List<MemcacheClient> getMasterL1List(); MemcacheClient getSlave(); List<MemcacheClient> getSlaveL1List(); boolean isSetbackMaster(); void setMaster(MemcacheClient master); void setMasterL1List(List<MemcacheClient> masterL1List); void setSlave(MemcacheClient slave); void setSlaveL1List(List<MemcacheClient> slaveL1List); void setSetbackMaster(boolean setbackMaster); boolean isMasterAsOneL1(); void setMasterAsOneL1(boolean masterAsOneL1); String getWirtePolicy(); void setWirtePolicy(String wirtePolicy);  }