Esempio n. 1
0
        internal QueryResultCache(QueryPredicateCompiler compiler)
        {
            m_compiler = compiler;
#if NETSTANDARD2_0
            m_memory_cache = new MemoryCache(new MemoryCacheOptions());
            m_entry_option.SlidingExpiration = compiler.GetExperationTime();
#else
            m_memory_cache = MemoryCache.Default;
            m_cache_policy = new CacheItemPolicy();
            m_cache_policy.SlidingExpiration = compiler.GetExperationTime();
#endif
        }
Esempio n. 2
0
 internal QueryResultCache(QueryPredicateCompiler compiler)
 {
     m_compiler     = compiler;
     m_memory_cache = MemoryCache.Default;
     m_cache_policy = new CacheItemPolicy();
     m_cache_policy.SlidingExpiration = compiler.GetExperationTime();
 }