public V put(K key, V value) throws CacheException {
        if (LOGGER.isTraceEnabled()) {
            LOGGER.trace("Putting object in cache [" + cache.getName() + "] for key [" + key + "]");
        }
        try {
            V previous = get(key);
            Element element = new Element(key, value);
            cache.put(element);
            return previous;
        } catch (Throwable t) {
            throw new CacheException(t);
        }
    }
Puts an object into the cache.

@param key   the key.
@param value the value.
support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCache.java