private static void SetQueryCache(WfIdentity key, WfCacheInfo value) { if (Interlocked.Increment(ref collect) == COLLECT_PER_TIMES) { CollectCacheGarbage(); } _wfQueryCache[key] = value; }
private static bool TryGetWfQueryCache(WfIdentity key, out WfCacheInfo value) { if (_wfQueryCache.TryGetValue(key, out value)) { value.RecordHit(); return(true); } value = null; return(false); }