MvcWrench.ExpiringCache.Get C# (CSharp) Method

Get() public method

public Get ( string key ) : object
key string
return object
        public object Get(string key)
        {
            if (!cache.ContainsKey (key))
                return null;

            CacheItem item = cache[key];

            if (item.IsExpired) {
                cache.Remove (key);
                return null;
            }

            return item.Value;
        }