cache-dependency

CacheDependancy for multiple Cached items

可紊 提交于 2019-12-24 07:27:49
问题 I would like to have an item in the ASP.NET CacheObject, which if it were changed a number of dependant items would be removed So.. In a request If prompted and it exists in the cache remove the root object, all dependence will be removed too Check for root object in the cache, if it doesn't exist, add it Add other objects to the cache with a dependency on the root object When I do this I get an error " An attempt was made to reference a CacheDependency object from more than one Cache entry "

ASP.NET set cache dependency with a SqlCommand

给你一囗甜甜゛ 提交于 2019-12-10 10:34:14
问题 Is this an effective way to set the cache item dependent on the query? HttpRuntime.Cache.Insert( "ListLanguages", list, new SqlCacheDependency(command), DateTime.UtcNow.AddMinutes(AppConfiguration.CacheExpiration.MinimumActivity), Cache.NoSlidingExpiration); command is a SqlCommand initialized previously as: SqlCommand command = new SqlCommand("Listlanguages", connection); where "ListLanguages" is a stored procedure which is simply a select. I find this an easier and more failure-proof method

ASP.NET set cache dependency with a SqlCommand

一世执手 提交于 2019-12-06 09:23:17
Is this an effective way to set the cache item dependent on the query? HttpRuntime.Cache.Insert( "ListLanguages", list, new SqlCacheDependency(command), DateTime.UtcNow.AddMinutes(AppConfiguration.CacheExpiration.MinimumActivity), Cache.NoSlidingExpiration); command is a SqlCommand initialized previously as: SqlCommand command = new SqlCommand("Listlanguages", connection); where "ListLanguages" is a stored procedure which is simply a select. I find this an easier and more failure-proof method than aggregated cache dependency (I mean failure-proof because I don't have to aggregated the tables

SQLCacheDependency and AppFabric Server

徘徊边缘 提交于 2019-11-30 13:49:12
I have a situation where I need to replace our current file based cache dependency system with a new one. What I am looking at is moving towards using AppFabric for caching. I was wondering if the SQLDependencyCaching technique where the table notifies the application of data updates works with AppFabric as it does with ASP.NET built in caching? There is no support within AppFabric caching for the SqlCacheDependency mechanism (or in fact for any kind of dependency). However, AppFabric 1.1 introduces the DataCacheStoreProvider class, which can be used to ensure that the cache is always in sync

Is there some sort of CacheDependency in System.Runtime.Caching?

一个人想着一个人 提交于 2019-11-30 03:23:40
问题 I heard that .NET 4 has a new caching API. Okay, so the good old System.Web.Caching.Cache (which is, by the way, still there in .NET 4) has the ability to set so-called CacheDependency objects to determine whether a cached item is expired or not. One can also specify custom logic for determining whether a cached item is still useable or not by deriving a custom subclass from CacheDependency . I'm curious, is there a way to provide such a logic in the new API? 回答1: I haven't really used it yet

SQLCacheDependency and AppFabric Server

谁都会走 提交于 2019-11-29 19:12:01
问题 I have a situation where I need to replace our current file based cache dependency system with a new one. What I am looking at is moving towards using AppFabric for caching. I was wondering if the SQLDependencyCaching technique where the table notifies the application of data updates works with AppFabric as it does with ASP.NET built in caching? 回答1: There is no support within AppFabric caching for the SqlCacheDependency mechanism (or in fact for any kind of dependency). However, AppFabric 1