public object Get(string key, CacheGetOptions options) { object value = _cacheClient.Get(key, options); LogGet(key, value, options); return(value); }
/// <summary> /// Returns the value associated with the given key. /// </summary> /// <param name="key">A key of the item to return from cache.</param> /// <param name="options">The options <see cref="CacheGetOptions"/> to use when making a request.</param> /// <returns>The value stored in the cache.</returns> public object Get(string key, CacheGetOptions options) { Guard.ArgumentNotNullOrEmptyString(key, "key"); Guard.ArgumentNotNull(options, "options"); object value = this.cacheManager.GetData(key); if (options.AutoRemove) { Remove(key); } return(value); }
internal object DoGet(bool isPublic, string key, CacheGetOptions getOptions) { object obj2; CacheKey cacheKey = new CacheKey(key, isPublic); CacheEntry entry = this.UpdateCache(cacheKey, null, false, CacheItemRemovedReason.Removed, out obj2); if (entry == null) { return null; } if ((getOptions & CacheGetOptions.ReturnCacheEntry) != CacheGetOptions.None) { return entry; } return entry.Value; }
internal object DoGet(bool isPublic, string key, CacheGetOptions getOptions) { CacheKey cacheKey = new CacheKey(key, isPublic); object obj; CacheEntry cacheEntry = this.UpdateCache(cacheKey, null, false, CacheItemRemovedReason.Removed, out obj); if (cacheEntry == null) { return(null); } if ((getOptions & CacheGetOptions.ReturnCacheEntry) != CacheGetOptions.None) { return(cacheEntry); } return(cacheEntry.Value); }
internal object Get(string key, CacheGetOptions getOptions);
internal object Get(string key, CacheGetOptions getOptions) { return(this.DoGet(false, key, getOptions)); }
internal object DoGet(bool isPublic, string key, CacheGetOptions getOptions) { CacheEntry entry; CacheKey cacheKey; object dummy; cacheKey = new CacheKey(key, isPublic); entry = UpdateCache(cacheKey, null, false, CacheItemRemovedReason.Removed, out dummy); if (entry != null) { if ((getOptions & CacheGetOptions.ReturnCacheEntry) != 0) { return entry; } else { return entry.Value; } } else { return null; } }
internal object Get(string key, CacheGetOptions getOptions) { return DoGet(false, key, getOptions); }
internal object Get(string key, CacheGetOptions getOptions) { return _cacheInternal.DoGet(true, key, getOptions); }
public object Get(string key, CacheGetOptions getOptions) { throw new NotImplementedException(); }
private void LogGet(string key, object value, CacheGetOptions options) { string action = value == null ? "miss" : "hit"; LogItem(action, options.Region, key, value); }
/// <summary> /// Gets the object at the specified key from the cache, or null if the key does not exist. /// </summary> /// <param name="key"></param> /// <param name="options"></param> /// <returns></returns> public object Get(string key, CacheGetOptions options) { return(_provider.Get(_cacheId, key, options)); }
/// <summary> /// Gets the object at the specified key from the cache, or null if the key does not exist. /// </summary> /// <param name="key"></param> /// <param name="options"></param> /// <returns></returns> public object Get(string key, CacheGetOptions options) { return _provider.Get(_cacheId, key, options); }
public object Get(string key, CacheGetOptions options) { object value = _cacheClient.Get(key, options); LogGet(key, value, options); return value; }
private void LogGet(string key, object value, CacheGetOptions options) { string action = value == null ? "miss" : "hit"; LogItem(action, options != null ? options.Region : null, key, value); }
public object Get(string key, CacheGetOptions options) { ValueOptionsPair value; return(_cache.TryGetValue(key, out value) ? value.Value : null); }
internal object Get(string key, CacheGetOptions getOptions) { return(_cacheInternal.DoGet(true, key, getOptions)); }