473,324 Members | 2,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Questions about the HttpContext cache object.

Jim
Hi,

I have a few questions regarding the cache object:

Does the cache object exist through postbacks?

The cache object only exists for the current request, right?

Is there a way to cache objects across multiple requests/sessions?
Say, I have two users requesting the same page, can they share cached
objects?

Is there a way to measure the amount of resources used by the cache
objects per application/virtual dir, etc? (Win2k Server - if
specifically needed)
Thanks for any help

Jim
Nov 15 '05 #1
1 3346
Jim,

See inline:

"Jim" <ji*@biacreations.com> wrote in message
news:5e**************************@posting.google.c om...
Hi,

I have a few questions regarding the cache object:

Does the cache object exist through postbacks?
Yes, it does.

The cache object only exists for the current request, right?
No, the affinity of the cache is the app-domain that it is running in.
So, all sessions have access to the cache.

Is there a way to cache objects across multiple requests/sessions?
Say, I have two users requesting the same page, can they share cached
objects?
The Cache object now does this.

Is there a way to measure the amount of resources used by the cache
objects per application/virtual dir, etc? (Win2k Server - if
specifically needed)
There are a few performance counters available for the cache. They are:

Cache Total Entries
Cache Total Hits
Cache Total Misses
Cache Total Hit RatioCache Total Turnover RateCache API Entries
Cache API HitsCache API MissesCache API Hit Ratio
Cache API Turnover Rate

You can find this list and the definitions of the counters in the .NET
framework documentation under "Performance Counters for ASP.NET", located at
(watch for line wrap):

http://msdn.microsoft.com/library/de...sforaspnet.asp

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com


Thanks for any help

Jim

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: George Ter-Saakov | last post by:
What is HttpContext.Cache for ? The usual HttpRequest lasts miliseconds. Why would someone to cache anything? We do have HttpContext.Items to keep any extra info during the request. Can...
3
by: James | last post by:
If I have set the session state for an asp.net application to be out of process how does this affect the HttpContext.Cache? What I want to know it is possible to store the Cache out of process as...
4
by: Mat | last post by:
Hi, I've stumbled onto a problem when using the caching object in ASP.Net. I'm placing a static dataset to the cache as the data only changes once a day. Whilst writing to the cache I'm using...
3
by: xzzy | last post by:
A. I need to access: System.Web.HttpContext.Current.Cache but get this error: "Object reference not set to an instance of the object" B. System.Web.HttpContext.Current.Cache is accessible...
2
by: J055 | last post by:
Hi I've implemented caching for my ObjectDataSource. <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" EnableCaching="True" CacheDuration="10" CacheExpirationPolicy="Sliding" ...
1
by: Jobs | last post by:
What is application object ? Application object can used in situation where we want data to be shared across users globally. What's the difference between Cache object and application object...
4
by: msch-prv | last post by:
Hello. I am trying to use caching to populate a datalist. The select method of the associated objectdatasource calls up GetRecipePageByRecipeCatID() to request the proper data (I am using custom...
6
by: =?Utf-8?B?emlubw==?= | last post by:
in asp.net 2, I load a dataset from the Cache object into a local object to use to perform processing. I had been using httpcontext.current.cache and what I noticed is sometime I'm not able to get...
8
by: SpaceMarine | last post by:
hello, my web app form has many DropDownLists that pull their content from a database. these calls are in a Business Access Layer, when first checks the context's Cache object for existing...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.