What is the difference between application and cache variables?
Answers were Sorted based on User's Feedback
Answer / chandra prakash
the key difference between them is the added features
provided by the Cache object like the expiration policies
and dependencies. It means that the data stored in the cache
object can be expired/removed based on some predefined time
limit set by the application code or when the dependent
entity gets changed whereas this feature is not available in
the Application object.
Although when we want to save some database results like
dataset or datatable and we dont want to send the request
frequently to the database server, we use cache object.
| Is This Answer Correct ? | 22 Yes | 2 No |
Answer / sandip bramhankar
Application object in not thread safe. You have to provide
your owen locking. But Cache is thread safe. Oveerhead of
locking can avoide by using Cache object
| Is This Answer Correct ? | 5 Yes | 2 No |
Answer / prasanna
In application state we have to lock and unlock the
application.In cache it is not required. A cache object
supports dependencies such as file dependencies and SQL
dependencies.If there is any change in the file or in the
database tables cache expires.But an application does not
support dependencies.Cache objects employ expiration
policies whereas an application variable does not have the
expiration set.It has the life of the application.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sunaina
The main difference between the Cache and Application
objects is that the Cache object
provides cache-specific features, such as dependencies and
expiration policies.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / shalini
Application variable is used globally through out the
application across the muktiple users where cache variable
is used for cache specific items such as cache memory,
cache dependencies etc.
| Is This Answer Correct ? | 5 Yes | 18 No |
Answer / rajnish kr bhatt
Application var is global to user however cache is specific
to user
| Is This Answer Correct ? | 3 Yes | 41 No |
What is the DLL Hell Problem?
Take one textbox if I am inputting abc alphabet in capital letter or in small letter on the button click it will be bcd or if I enter 123 and it would be 234 like that in ASP.NET?
In asp.net, if a webpage seems too slow to load completely in th ebrowser. In this case what are the checkings or actions you will take to rectify the slowness or which are the factors related to this issue? How we can trace it?
Is it possible to perform data validations in the database?
I am using a range validator and want to use dd mm yyyy format for accepting dates. I get a fairly generic "can't do that" type exception when I use this format for setting the minValue or maxValue properties for the range validator. How can I force it to accept my format?
how to handle sql exceptions?
How is session id generated?
Why we use dbms for projects? Why don’t we save any application data in separate files instead of dbms?
What is postback request?
What is different in .net 1.1 and .net 2.0?
what exception is thrown when you do a response.redirect
How to add DateTime Control in normal DataGrid Server Control?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)