473,606 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cache Session and ViewState

Session["A"]
ViewState["A"]
Cache["A"]

Already There are
Session and ViewState
What is the use of Cache ?
Mar 1 '06 #1
3 1194
> Session["A"]
ViewState["A"]
Cache["A"]

Already There are
Session and ViewState
What is the use of Cache ?


Session stores things for the specific user,
ViewState for a specific page, as long as you remain in a "postback"
situation (after a redirect, it's gone)
Cache stores things at an application level (*not* user specific). It
can also handle several expiry mechanisms.

There is also Application["A"], also "applicatio n" level (as the name
suggests), but without the expiry features of Cache.

Hans Kesting
Mar 1 '06 #2
Then, What is the difference of Cache and Application ?
Cache["A"]
Application["A"]

"Hans Kesting" <ne***********@ spamgourmet.com > wrote in message
news:mn******** *************** @spamgourmet.co m...
Session["A"]
ViewState["A"]
Cache["A"]

Already There are
Session and ViewState
What is the use of Cache ?


Session stores things for the specific user,
ViewState for a specific page, as long as you remain in a "postback"
situation (after a redirect, it's gone)
Cache stores things at an application level (*not* user specific). It can
also handle several expiry mechanisms.

There is also Application["A"], also "applicatio n" level (as the name
suggests), but without the expiry features of Cache.

Hans Kesting

Mar 1 '06 #3
Oh, Got it, Thx.

"Hans Kesting" <ne***********@ spamgourmet.com > wrote in message
news:mn******** *************** @spamgourmet.co m...
Session["A"]
ViewState["A"]
Cache["A"]

Already There are
Session and ViewState
What is the use of Cache ?


Session stores things for the specific user,
ViewState for a specific page, as long as you remain in a "postback"
situation (after a redirect, it's gone)
Cache stores things at an application level (*not* user specific). It can
also handle several expiry mechanisms.

There is also Application["A"], also "applicatio n" level (as the name
suggests), but without the expiry features of Cache.

Hans Kesting

Mar 1 '06 #4

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

Similar topics

3
2205
by: Arthur Dzhelali | last post by:
Is there any way to cache dataset on one page and it will be accessible for one user? if you declare dataset shared it will stay on the server and page will be able reference to it on reload, but in this case it will be shared with other users who use the page. Right now I found work around it by saving each dataset as xml file with users's sessionid in file name and reading it on page reload. is there a better way?
3
4104
by: Alex Nitulescu | last post by:
Sorry, I'm really confused - I'm only at the middle of my book and already I can count 4 methods to store values. Yes, I know that cookies can not store much, but what is the difference between storing data in the cache object, in a viewstate and in a Session. I can say Cache("MyData")=objDataSet as well as
3
1938
by: MattC | last post by:
Hi, I am persisting the viewstate for each page into the Cache object, below is shown my methods for saving and loading: I am able to save the viewstate to the cache and most times I can load it ok, however it seems that every now and again it fails to Deserialize the viewstate. My Application pool is set to shutdown after 180mins of idle.
2
1981
by: Kikoz | last post by:
Hi all. I keep my ViewState in server's cache. Works fine except when user leaves the page opened for a long time (2 hours or so). Then if he/she tries to post it back the server throws an exception saying that ViewState was invalid. I suspect it has something to do with cache expiration time. Can I control its expiration time from within my web.config? Or anyhow? Couldn't find anything related in web or machine config files or...
2
1699
by: Ryan Ternier | last post by:
I'm playing around with Cache and Viewstate. I've made a small little example that reminds me of grade 12: if(!IsPostBack) { ArrayList alTest = new ArrayList(); alTest.Add("This is from the ViewState"); alTest.Add("This is another from the viewstate");
4
5930
by: INeedADip | last post by:
Can I put a generic List<MyObject> in cache? I read that generics can't be serialized.. Can I cache them? Can I return them from Web Services?
5
1221
by: Prashanth | last post by:
Hi, I want to cache an object whose scope in only within the page. The cache should expire once the user leaves the page. How can I do it? Regards, Prashanth
2
1934
by: LeAnne | last post by:
My question is to do with scalability and the location for storate of cache, session, viewstate and application data. Application - Data is stored in memory (in process) Session - Data is stored in memory (in process or out of process) - can be configured to store the session data in sql server (which relates to my question) ViewState - Page (but can be modified to overwrite the storage mechanism to store viewstate else where, esp...
0
8010
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7942
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8433
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8300
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6761
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
3922
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3969
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1550
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1287
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.