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