public int size() {
        try {
            return cache.getSize();
        } catch (Throwable t) {
            throw new CacheException(t);
        }
    }
Removes all elements in the cache, but leaves the cache in a useable state.
support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCache.java