Exemplo n.º 1
0
        public FanoutSearchModule()
        {
            this.Started += OnStart;

            m_compiler = new QueryPredicateCompiler();
            m_cache    = new QueryResultCache(m_compiler);
        }
Exemplo 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();
 }
Exemplo n.º 3
0
        internal QueryResultCache(QueryPredicateCompiler compiler)
        {
            m_compiler = compiler;
#if NETSTANDARD2_0
            m_memory_cache = new MemoryCache(new MemoryCacheOptions());
            m_entry_option.SlidingExpiration = compiler.GetExpirationTime();
#else
            m_memory_cache = MemoryCache.Default;
            m_cache_policy = new CacheItemPolicy();
            m_cache_policy.SlidingExpiration = compiler.GetExpirationTime();
#endif
        }