Questions tagged [asp.net-caching]
40 questions
1
vote
1 answer
HttpContext.Current.Items is too fast to access item, but How?
I wrote simple test
add 100 items to [Collection]
read 1000000 times from [Collection] randomly
When
[Collection]==HttpContext.Current.Items it takes 50 ms
[Collection]==HttpRuntime.Cache it takes 430ms
[Collection]==HashTable ||…

sh1ng
- 2,808
- 4
- 24
- 38
1
vote
1 answer
Asp.net core Caching In-Memory and Distributed together
Can In-Memory caching and Distributed Cache be used together in the same application? Does it make sense after all?
A logic scenario that comes to my mind is to manager Session state (on top of In-Memory, taking advantage of sticky sessions ) and …

VMh
- 1,300
- 1
- 13
- 19
1
vote
1 answer
Where to store .net user roles between page requests
I've got a web site that implements its own Forms based login, and creates an authentication cookie like this:
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1, userID, DateTime.UtcNow, expiration, isPersistent,…

paulH
- 1,102
- 16
- 43
1
vote
0 answers
.Net Enterprise Cache - refresh instantly?
I'm using Enterprise Library Caching for my MVC3 application.
My code is something like this:
object myLock = new Object();
public static MyEntity[] getMyEntities()
{
MyEntity[] res;
res = getMyEntities(new…

Gonzalo
- 45
- 5
0
votes
2 answers
Unwanted ASP.Net MVC3 server side caching
I'm working on an MVC3 app and I've come across an issue with objects being cached unintentionally.
My code is creating objects from calls to a separate custom business logic dll.
This business logic dll gets data from a database.
After I change…
0
votes
1 answer
different versions of output caching based on selected values of several dropdownlists
So this is about output caching, and I am trying to use <%@ OutputCache VaryByParam="">, how to realize this?

appenthused
- 173
- 1
- 10
0
votes
1 answer
ASP.NET Core - Can we have 2 local memory with different size options
In ASP.NET Core, can we have 2 instances of local memory (IMemoryCache) which we can configure with different size options?
I know IMemoryCache is a singleton and only one instance should be available in application scope.
But I'm just curious is it…

Rupesh Shivarkar
- 27
- 2
0
votes
0 answers
In-Memory-Cache in .Net application on iis
I have implemented in-memory cache in .NET application without any expiration token. For some reason, the cache evicted by external proccess. At first I thought it happens because the Application Pool Recycling , thats true, and for that reason i…

Gal Shalom
- 43
- 6
0
votes
1 answer
Getting 104 error while accessing a web page
One of user is getting 104 (connection reset by peer) error while accessing one of the page in my application, though other pages are opening fine, problem persists only for this page and that too only on few users.
I tried clearing cookies on…

Pranali Desai
- 974
- 1
- 7
- 22
0
votes
0 answers
Memory Cache and Threads
Does MemoryCache create thread for each instance of the memory cache or there is a single thread across all memory cache instances? I have a few documentations that say that the granularity of the cache is 20 seconds and every 20 seconds a thread…

Yogesh
- 2,198
- 1
- 19
- 28
0
votes
1 answer
In Memory Cache testing for webapi2 in Production Or QA Testing
How to test the In Memory caching logic in production or QA environment.
//If the data exists in cache, pull it from there, otherwise make a call to database to get the data
ObjectCache cache = MemoryCache.Default;
var peopleData =…

Mohamed Sahir
- 2,482
- 8
- 40
- 71
0
votes
1 answer
ASP.NET Caching in a web cluster
We are building a large scale web platform where we try to use Caching to speed up things - though now it's a single server, we'll probably upgrade it to a cluster. Will the Caching work there? Should we consider anything special?
Thanks1

Roman
- 4,443
- 14
- 56
- 81
0
votes
1 answer
System.Web.Caching & System.Runtime.Caching against IIS App Pool restarts
In Asp.net Forms or MVC application, cache items which use System.Web.Caching get clear in an app pool restart.
But what happens if caching was achieved using System.Runtime.Caching ?

CodingPanda
- 178
- 1
- 14
0
votes
2 answers
what is the best way to check empty cache with MemoryCache Class?
I'm using simple ObjectCache and MemoryCache class to implement cache.
public class MemoryCacheManager
{
protected ObjectCache Cache
{
get
{
return MemoryCache.Default;
}
…

Neo
- 15,491
- 59
- 215
- 405
0
votes
1 answer
IIS Server Jumping from 0-100% shortly after application pool restart
I had my 'Timeout limit' set to 5 minutes on the app pool for my site.
I noticed that it was frequently stopping and restarting. Shortly after the app pool restarts the w3svc.exe starts with strange behaviour where the CPU shoots up and down from…

Luke
- 22,826
- 31
- 110
- 193