ddth-cache-adapter-core/src/main/java/com/github/ddth/cacheadapter/cacheimpl/redis/ShardedRedisCache.java
@Override
    public void deleteAll() {
        switch (keyMode) {
        case NAMESPACE:
            throw new CacheException.OperationNotSupportedException(
                    "Key mode[" + keyMode + "] does not support 'deleteAll' operation.");
        case MONOPOLISTIC:
            try (ShardedJedis jedis = getJedis()) {
                jedis.getAllShards().forEach(j -> j.flushAll());
            } catch (Exception e) {
                throw e instanceof CacheException ? (CacheException) e : new CacheException(e);
            }
            break;
        case HASH:
            try (ShardedJedis jedis = getJedis()) {
                jedis.del(getName());
            } catch (Exception e) {
                throw e instanceof CacheException ? (CacheException) e : new CacheException(e);
            }
            break;
        default:
            throw new IllegalStateException("Invalid key mode: " + keyMode);
        }
    }
@Override
    public void deleteAll() {
        switch (keyMode) {
        case NAMESPACE:
            throw new CacheException.OperationNotSupportedException(
                    "Key mode[" + keyMode + "] does not support 'deleteAll' operation.");
        case MONOPOLISTIC:
            try (ShardedJedis jedis = getJedis()) {
                jedis.getAllShards().forEach(j -> j.flushAll());
            } catch (Exception e) {
                throw e instanceof CacheException ? (CacheException) e : new CacheException(e);
            }
            break;
        case HASH:
            try (ShardedJedis jedis = getJedis()) {
                jedis.del(getName());
            } catch (Exception e) {
                throw e instanceof CacheException ? (CacheException) e : new CacheException(e);
            }
            break;
        default:
            throw new IllegalStateException("Invalid key mode: " + keyMode);
        }
    }
{@inheritDoc}