Questions tagged [system.web.caching]
9 questions
40
votes
3 answers
Cache.Add absolute expiration - UTC based or not?
The examples for Cache.Add uses DateTime.Now.Add to compute the expiration, i.e. it passes:
DateTime.Now.AddSeconds(60)
as the value of the absoluteExpiration parameter.
I'd have thought that computing it relative to DateTime.UtcNow would be more…

Ruben Bartelink
- 59,778
- 26
- 187
- 249
13
votes
2 answers
How to check if item exists in Cache (System.Web.Cache)?
Hi,
To check if the key already exists in cache I shoulde be able to do the following :
if(Cache["MyKey"] != null)
This does however not work? If I create an instance from the Cache class i will be able to get the object this way…

Banshee
- 15,376
- 38
- 128
- 219
6
votes
4 answers
ASP.NET MemoryCache Sharing Across Applications
I have been reading all over the place about the new MemoryCache class starting in .Net Framework 4.0. From what I've read, you can access the MemoryCache across different .Net applications. I am trying to share an object between an Asp.Net…

wayofthefuture
- 8,339
- 7
- 36
- 53
2
votes
2 answers
System.Web.Caching.Cache doesn't seem to refresh itself on time ?
I am using System.Web.Caching.Cache in an assembly used by my website.
I have set some key expiration (absolute expiration) to be 10 seconds (just for debugging).
I have also set a callback upon key removal.
The problem is that I see that the cache…

Yossi
- 539
- 9
- 20
2
votes
1 answer
System.Web.Caching and System.Runtime.Caching combined memory usage behavior
I have a legacy application, rather large that implements both System.Web.Caching and System.Runtime.Caching. Yes that's right, there are services running in the same application pool that could be using either.
My question is how will these…

DuctTaper
- 29
- 1
2
votes
1 answer
System.Web.Caching.Cache.NoSlidingExpiration in asp.net c#
Please tell me about System.Web.Caching.Cache.NoSlidingExpiration in ASP.NET.
anirudha Gupta
0
votes
1 answer
Using Web.Caching on XP Running IIS 5.1 Not available?
Environment: I am working on a site in ASP.Net 2.0 running on IIS6; I am developing locally on WinXP which runs IIS 5.1, using VS2005 and VB.
Issue: I am trying to create caching for some business layer objects (actually creating a caching layer)…

Sobi-Wan Kenobi
- 11
- 1
0
votes
0 answers
Web Cache disapperar after some time
I have the code like below.
When I open the page for the first time I get the data from the query, subsequent times I open the page I get data from the cache and query didn't run.
But when I open the page some time later, like 2 hours later, I don't…

Idilio
- 29
- 4
0
votes
2 answers
Clever caching using generics?
Are there any clever layers out there to sit on top of the System.Web.Caching.Cache class to handle simple scenarios to fetch items using generics.
I'd like to maybe provide a delegate function to retrieve an item, and be able to fetch an item with…

Simon_Weaver
- 140,023
- 84
- 646
- 689