@Test void createCache_withLocalMemCachedClient_createSimpleSpringMemcached() throws Exception { int memCachedPort = TestMemcacheServer.startServer(); MemcachedCacheFactory cacheFactory = new MemcachedCacheFactory(); SimpleSpringMemcached cache = cacheFactory.createCache("test", "localhost", memCachedPort); assertThat(cache).isNotNull(); assertThat(cache.getNativeCache()).isNotNull(); cache.put("test", "bar"); assertThat(cache.get("test", String.class)).isEqualTo("bar"); cache.clear(); cacheFactory.destroy(); }
@Override public SimpleSpringMemcached createCache(String cacheName, String host, int port) throws Exception { SimpleSpringMemcached springMemcached = new SimpleSpringMemcached( getConnectionFactory(host, port), cacheName); springMemcached.setExpiration(getExpiryTime(cacheName)); return springMemcached; }
MemcachedCacheFactory extends AbstractCacheFactory<MemcachedClient> { @Override public SimpleSpringMemcached createCache(String cacheName, String host, int port) throws Exception { SimpleSpringMemcached springMemcached = new SimpleSpringMemcached( getConnectionFactory(host, port), cacheName); springMemcached.setExpiration(getExpiryTime(cacheName)); return springMemcached; } }
MemcachedCacheFactory extends AbstractCacheFactory<MemcachedClient> { @Override public SimpleSpringMemcached createCache(String cacheName, String host, int port) throws Exception { SimpleSpringMemcached springMemcached = new SimpleSpringMemcached( getConnectionFactory(host, port), cacheName); springMemcached.setExpiration(getExpiryTime(cacheName)); return springMemcached; } MemcachedCacheFactory();  MemcachedCacheFactory(Map<String, Integer> expiryTimePerCache,
			int expiryTime); }
MemcachedCacheFactory extends AbstractCacheFactory<MemcachedClient> { @Override public SimpleSpringMemcached createCache(String cacheName, String host, int port) throws Exception { SimpleSpringMemcached springMemcached = new SimpleSpringMemcached( getConnectionFactory(host, port), cacheName); springMemcached.setExpiration(getExpiryTime(cacheName)); return springMemcached; } MemcachedCacheFactory();  MemcachedCacheFactory(Map<String, Integer> expiryTimePerCache,
			int expiryTime); @Override boolean isSupportingCacheArchitecture(String architecture); @Override SimpleSpringMemcached createCache(String cacheName, String host, int port); }
MemcachedCacheFactory extends AbstractCacheFactory<MemcachedClient> { @Override public SimpleSpringMemcached createCache(String cacheName, String host, int port) throws Exception { SimpleSpringMemcached springMemcached = new SimpleSpringMemcached( getConnectionFactory(host, port), cacheName); springMemcached.setExpiration(getExpiryTime(cacheName)); return springMemcached; } MemcachedCacheFactory();  MemcachedCacheFactory(Map<String, Integer> expiryTimePerCache,
			int expiryTime); @Override boolean isSupportingCacheArchitecture(String architecture); @Override SimpleSpringMemcached createCache(String cacheName, String host, int port);  }