MSSQL数据库链接字符串Asynchronous Processing=true不是异步查询吗,怎么是缓存

时间:2021-07-16 07:33:38

;Asynchronous Processing=true  不是异步查询吗,怎么是缓存

<!--<add name="default" providerName="System.Data.SqlClient" connectionString="Data Source=(localdb)\MSSQLLocalDB;Integrated Security=True;Initial Catalog=candoo;Asynchronous Processing=true " />-->

 

    public class CandooDbConfiguration : System.Data.Entity.DbConfiguration
    {
        public CandooDbConfiguration()
        {

#if !DEBUG
            #region EFCache

            //var transactionHandler = new CacheTransactionHandler(new InMemoryCache());

            //AddInterceptor(transactionHandler);

            //var cachingPolicy = new CachingPolicy();

            //Loaded +=
            //  (sender, args) => args.ReplaceService<DbProviderServices>(
            //    (s, _) => new CachingProviderServices(s, transactionHandler,
            //      cachingPolicy));

            #endregion
#endif
            //#if DEBUG
            //DbInterception.Add(new CanDoo.Data.Entity.Interceptors.EFIntercepterLogging());
            //#endif
        }  
    }