ddth-cache-adapter-core/src/main/java/com/github/ddth/cacheadapter/cacheimpl/redis/RedisCache.java
@Override
    public boolean exists(String key) {
        final String KEY = calcCacheKey(key);
        try (Jedis jedis = getJedis()) {
            if (keyMode == KeyMode.HASH) {
                return jedis.hget(SafeEncoder.encode(getName()), SafeEncoder.encode(KEY)) != null;
            } else {
                return jedis.get(SafeEncoder.encode(KEY)) != null;
            }
        } catch (Exception e) {
            throw e instanceof CacheException ? (CacheException) e : new CacheException(e);
        }
    }
@Override
    public boolean exists(String key) {
        final String KEY = calcCacheKey(key);
        try (Jedis jedis = getJedis()) {
            if (keyMode == KeyMode.HASH) {
                return jedis.hget(SafeEncoder.encode(getName()), SafeEncoder.encode(KEY)) != null;
            } else {
                return jedis.get(SafeEncoder.encode(KEY)) != null;
            }
        } catch (Exception e) {
            throw e instanceof CacheException ? (CacheException) e : new CacheException(e);
        }
    }
@ Override public boolean exists ( String key ) { final String KEY = calcCacheKey ( key ) ; try ( Jedis jedis = getJedis ( ) ) { if ( keyMode == KeyMode . HASH ) { return jedis . hget ( SafeEncoder . encode ( getName ( ) ) , SafeEncoder . encode ( KEY ) ) != null ; } else { return jedis . get ( SafeEncoder . encode ( KEY ) ) != null ; } } catch ( Exception e ) { throw e instanceof CacheException ? ( CacheException ) e : new CacheException ( e ) ; } }
{@inheritDoc}
{