class SSMCache implements Cache {

    @Override
    public void clear() {
        if (!cache.isEnabled()) {
            LOGGER.warn("Cache {} is disabled. Cannot clear cache.", cache.getName());
            return;
        }

        if (!allowClear) {
            LOGGER.error("Clearing cache '{}' is not allowed. To enable it set allowClear to true. "
                    + "Make sure that caches don't overlap (one memcached instance isn't used by more than one cache) "
                    + "otherwise clearing one cache will affect another.", getName());
            throw new IllegalStateException("Cannot clear cache " + getName());
        }
        try {
            LOGGER.info("Clear {}", cache.getName());
            cache.flush();
        } catch (TimeoutException | CacheException | RuntimeException e) {
            logOrThrow(e, "An error has ocurred for cache {}", getName(), e);
        }
    }

    public  SSMCache(final com.google.code.ssm.Cache cache, final int expiration, final boolean allowClear, final boolean registerAliases,
            final boolean muteExceptions);
    public  SSMCache(final com.google.code.ssm.Cache cache, final int expiration, final boolean allowClear);
    public  SSMCache(final com.google.code.ssm.Cache cache, final int expiration);
    public  SSMCache(final SSMCache ssmCache, final int expiration);

}