@SuppressWarnings("unchecked")
    public V get(K key) throws CacheException {
        try {
            if (LOGGER.isTraceEnabled()) {
                LOGGER.trace("Getting object from cache [" + cache.getName() + "] for key [" + key + "]");
            }
            if (key == null) {
                return null;
            } else {
                Element element = cache.get(key);
                if (element == null) {
                    if (LOGGER.isTraceEnabled()) {
                        LOGGER.trace("Element for [" + key + "] is null.");
                    }
                    return null;
                } else {
                    return (V) element.getObjectValue();
                }
            }
        } catch (Throwable t) {
            throw new CacheException(t);
        }
    }
Gets a value of an element which matches the given key.

@param key the key of the element to return.
@return The value placed into the cache with an earlier put, or null if not found or expired
support/ehcache/src/main/java/org/apache/shiro/cache/ehcache/EhCache.java