Hi folks,
I've got two items in my cache
Key: Cat
Key: Animal_Vacinations
Now, Animal_Vacinations has a key-based cache dependency on Cat. So, if anything changes for the cache item Cat, then the cache item Animal_Vacinations get invalidated. PERFECT :)
Ok.. now to the problem.
After i create the 2nd cache item (ie. Animal_Vacinat...
I want to use SQL cache dependency with SubSonic. How can I do this?
...
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.NoSlidingExpirati...
We need to return subset of records and for that we use the following command:
using (SqlCommand command = new SqlCommand(
"SELECT ID, Name, Flag, IsDefault FROM (SELECT ROW_NUMBER() OVER (ORDER BY @OrderBy DESC) as Row, ID, Name, Flag, IsDefault FROM dbo.Languages) results WHERE Row BETWEEN ((@Page - 1) * @ItemsPerP...
After many hours, I finally realize that I am working correctly with the Cache object in my ASP.NET application but my stored procedures stops it from working correctly.
This stored procedure works correctly:
CREATE PROCEDURE [dbo].[ListLanguages]
@Page INT = 1,
@ItemsPerPage INT = 10,
@OrderBy NVARCHAR (100) = 'ID',
@OrderDirection NV...
I am trying to implement caching in an web application. The caching is to be done in the BLL.
The BLL method signiture is
public static List<Ailias> Select(List<Filter> filters)
and at the moment simply calls the corresponding method in the DAL.
The issue I'm having is my cache dependancy will be the filters object, whenever the fi...
I am building an ASP.NET application. Within each ASPX page, we are outputting inline snippets of HTML that are pulled from static text files. Similar to the example shown here:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=331
As in the article, we store the contents of the files in HttpRuntime.Cache with a CacheDependency pointing t...
I am working on a framework where .aspx and .master pages are embedded in an assembly, using VirtualPathProvider to route a url to a specific embedded resource.
Sample url: /_framework.aspx/mypage.aspx (which uses /_framework.aspx/mymaster.master)
_framework.aspx will make IIS6 route the request through ASP.NET framework
everything ...
HI,
In our .aspx pages we have many user controls. each user control executes a sql query. The caching mechanism to be followed is to fragment cache each user control on the page and add the query dependency to the respective queries of the user controls.
How to achieve query dependency on fragment cached data for invalidation?
...
I have a web service application which uses the Context.Cache to store some information. This information is read from a file so I have added the item to the cache and used a CacheDependency with the file path as the arg hoping that when the file time stamp changes, the cache would be invalidated.
The file in question is replicated to 2...
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 o...
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 cach...