ddth-cache-adapter-core/src/main/java/com/github/ddth/cacheadapter/cacheimpl/memcached/XMemcachedCache.java
@Override
    protected Object internalGet(String key) {
        String _data = null;
        switch (keyMode) {
        case MONOPOLISTIC:
        case NAMESPACE:
            final String KEY = keyMode == KeyMode.MONOPOLISTIC ? key : calcCacheKeyNamespace(key);
            try {
                _data = getMemcachedClient().get(KEY);
            } catch (Exception e) {
                throw e instanceof CacheException ? (CacheException) e : new CacheException(e);
            }
            break;
        case XNAMESPACE:
            try {
                _data = getMemcachedClient().withNamespace(getName(),
                        new MemcachedClientCallable<String>() {
                            @Override
                            public String call(MemcachedClient client) throws MemcachedException,
                                    InterruptedException, TimeoutException {
                                return client.get(key);
                            }

                        });
            } catch (Exception e) {
                throw e instanceof CacheException ? (CacheException) e : new CacheException(e);
            }
            break;
        default:
            throw new IllegalStateException("Invalid key mode: " + keyMode);
        }
        if (_data != null) {
            byte[] data = Base64.decodeBase64(_data);
            CacheEntry ce = deserializeCacheEntry(data);
            if (ce != null && ce.touch()) {
                set(key, ce, ce.getExpireAfterWrite(), ce.getExpireAfterAccess());
            }
            return ce;
        }
        return null;
    }
@Override
    protected Object internalGet(String key) {
        String _data = null;
        switch (keyMode) {
        case MONOPOLISTIC:
        case NAMESPACE:
            final String KEY = keyMode == KeyMode.MONOPOLISTIC ? key : calcCacheKeyNamespace(key);
            try {
                _data = getMemcachedClient().get(KEY);
            } catch (Exception e) {
                throw e instanceof CacheException ? (CacheException) e : new CacheException(e);
            }
            break;
        case XNAMESPACE:
            try {
                _data = getMemcachedClient().withNamespace(getName(),
                        new MemcachedClientCallable<String>() {
                            @Override
                            public String call(MemcachedClient client) throws MemcachedException,
                                    InterruptedException, TimeoutException {
                                return client.get(key);
                            }

                        });
            } catch (Exception e) {
                throw e instanceof CacheException ? (CacheException) e : new CacheException(e);
            }
            break;
        default:
            throw new IllegalStateException("Invalid key mode: " + keyMode);
        }
        if (_data != null) {
            byte[] data = Base64.decodeBase64(_data);
            CacheEntry ce = deserializeCacheEntry(data);
            if (ce != null && ce.touch()) {
                set(key, ce, ce.getExpireAfterWrite(), ce.getExpireAfterAccess());
            }
            return ce;
        }
        return null;
    }
{@inheritDoc}