Questions tagged [httpruntime.cache]

53 questions
3
votes
2 answers

iisExpress local httpruntime.cache always null

strange problem here. On local development in asp.net webforms (4.5 / 4.7) I am finding httpruntime.Cache always null even when properly set. I attempted it on another iis express workstation and found the same behavior, even with a tester single…
Davery
  • 317
  • 1
  • 10
3
votes
1 answer

Does Azure have support for HttpRuntime.Cache for an ASP.Net application?

My ASP.Net application uses HTTPRuntime.Cache. If I host it on Azure: Will there be any compilation errors assuming HTTPRuntime.Cache is not supported on Azure There will not be any compliation errors, but HttpRunTime.Cache always returns null for…
coder_bro
  • 10,503
  • 13
  • 56
  • 88
3
votes
1 answer

is cacheitemremovedcallback of HttpRuntime.Cache thread safe?

i use HttpRuntime.Cache.Insert to insert data into cache. i have the function 'onremove' as the cacheitemremovedcallback - when the cache expires (after 15 minutes) it releases data in cache and calls 'onremove' that insert the data again to the…
Rodniko
  • 4,926
  • 20
  • 69
  • 93
3
votes
2 answers

Can I share HttpRuntime.Cache between applications?

I have a website setup like this: /Web --this is the client facing site /Web/Admin --this is the backend system and is setup as a Virtual Application I'm using HttpRuntime.Cache for caching calls to the database. What I want to be able to do…
Micah
  • 111,873
  • 86
  • 233
  • 325
3
votes
2 answers

Accessing HttpRuntime.Cache from other Thread

I have a thread running behind my ASP.Net. In this thread I put data in the cache like this: HttpRuntime.Cache.Insert("test", "test", null, DateTime.Today.AddHours(6), Cache.NoSlidingExpiration); On the other thread(the webpage) I first check if…
Timo Hermans
  • 165
  • 2
  • 10
2
votes
1 answer

50GB HttpRuntime.Cache Persistence Possible?

We have an ASP.NET 4.0 application that draws from a database a complex data structure that takes over 12 hours to push into an in memory data structure (that is later stored in HttpRuntime.Cache). The size of the data structure is quickly…
Stephen
  • 21
  • 2
2
votes
1 answer

Memory using by a Hashtable object in .Net

We have a web application which is using HttpRuntime Cache for storing frequently using DB data. code snippet is: public static void Add(string cacheName, Hashtable cacheValue) { System.Web.HttpRuntime.Cache.Add(cacheName, cacheValue, null,…
Sunil
  • 2,885
  • 5
  • 34
  • 41
2
votes
1 answer

Global cache object keeps adding items

I noticed that in my ASP.NET web application, the internal global cache object keeps adding items like: System.Web.Script.Services.WebServiceData:/mypages/default.aspx. Note that I do have a folder "mypages" with a default.aspx in it. Why is this…
Rocky Singh
  • 15,128
  • 29
  • 99
  • 146
1
vote
1 answer

Value stored in session depends on value in HttpRuntime cache

I have data common for all users stored in HttpRuntime.Cache. Then I have some user related data stored in Session. HttpRuntime.Cache has CacheDependency mechanism, which can be used to define relationships between the items in cache. What would…
1
vote
2 answers

Is there a difference between caching IEnumerable or IList in HttpRuntime cache?

Assuming the following piece of code that caches two collections of objects MyObject: one collection is of type IEnumerable and the other one is of type List. The code retrieves the values from the cache and then accesses the…
Luke
  • 22,826
  • 31
  • 110
  • 193
1
vote
1 answer

How to prevent HttpRuntime.Cache to remove items in ASP.NET 4.5?

This is a follow-up to this question, which contains contradictory answers. I am also interested in an answer related to a more recent version of ASP.NET. My application uses HttpRuntime.Cache to cache some lists of models that should never expire.…
1
vote
2 answers

Determine the age of an object in the cache

I'd like to be able to determine the age of an item in the HttpRuntime cache and was wondering if there was any way to do this. Basically what I in my class is parse a third party XML file into an object and then store the object in the cache.…
Kyle
  • 4,261
  • 11
  • 46
  • 85
1
vote
1 answer

ASP.NET: HttpRuntime.Cache getting flushed when saving WebConfigurationManager -- Is this a bug?

Recently, I've been experimenting with caching objects with HttpRuntime.Cache and I was generally under the impression that if I "added" something to the cache like this: HttpRuntime.Cache.Insert("Test", "This is a test!", null, …
Pretzel
  • 8,141
  • 16
  • 59
  • 84
1
vote
1 answer

Accessing HttpRUntime.Cache in console app

I have a console app that needs to dynamically load all the endpoints in my API app and get the details of the data that is cached. foreach (var routeTemplate in listRouteTempplates) { HttpWebRequest request =…
Newbee
  • 47
  • 8
1
vote
0 answers

FATAL: System.Web.HttpException (0x80070057): Invalid file name for file monitoring: ''

I get the following issue : FATAL: System.Web.HttpException (0x80070057): Invalid file name for file monitoring: ''. Common reasons for failure include: - The filename is not a valid Win32 file name. - The filename is not an absolute path. - The…