What is the difference between application and cache variables?

Answers were Sorted based on User's Feedback



What is the difference between application and cache variables?..

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

What is the difference between application and cache variables?..

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

What is the difference between application and cache variables?..

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

What is the difference between application and cache variables?..

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

What is the difference between application and cache variables?..

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

What is the difference between application and cache variables?..

Answer / rajnish kr bhatt

Application var is global to user however cache is specific
to user

Is This Answer Correct ?    3 Yes 41 No

Post New Answer

More ASP.NET Interview Questions

How to kill session?

18 Answers   Protech,


Hi this is the coding for adding data in to an xml table i want the coding for update and delete Try Dim emp_xml_doc As New XmlDocument If System.IO.File.Exists(Server.MapPath("emp.xml")) Then emp_xml_doc.Load(Server.MapPath("emp.xml")) Dim myrow_element As XmlElement myrow_element = emp_xml_doc.CreateElement("EmpDetails") Dim str As String str = "<EmpID>" & TxtEmpId.Text & "</EmpID>" & _ "<Empname>" & TxtName.Text & "</Empname>" & _ "<EmpSalary>" & TxtSalary.Text & "</EmpSalary>" myrow_element.InnerXml = str emp_xml_doc.DocumentElement.AppendChild(myrow_element) emp_xml_doc.Save(Server.MapPath("emp.xml")) Response.Write("Record Saved") Dim ds As New DataSet ds.ReadXml(Server.MapPath("emp.xml")) GridView1.DataSource = ds GridView1.DataBind() Else Response.Write("File does not exist.") End If Catch ex As Exception Response.Write(ex.ToString) End Try *********************** this is the xml file <?xml version="1.0" encoding="utf-8" ?> <Employee> <empdetails> <empid>100</empid> <empname>xxx</empname> <empsalary>2000</empsalary> </empdetails> <EmpDetails> <EmpID>yyy</EmpID> <Empname>dddd</Empname> <EmpSalary>77777</EmpSalary> </EmpDetails> <EmpDetails> <EmpID>rrrr</EmpID> <Empname>rrrr</Empname> <EmpSalary>6666</EmpSalary> </EmpDetails> <EmpDetails> <EmpID>qaqa</EmpID> <Empname>sini</Empname> <EmpSalary>50000</EmpSalary> </EmpDetails> <EmpDetails> <EmpID>errrrrrrrr</EmpID> <Empname>rrrrrrrrr</Empname> <EmpSalary>677777</EmpSalary> </EmpDetails> <EmpDetails> <EmpID>rrr</EmpID> <Empname>rrr</Empname> <EmpSalary>33</EmpSalary> </EmpDetails> </Employee>

0 Answers   InfoCom,


What is hidden field in asp.net?

0 Answers  


When maintaining session through Sql server, what is the impact of Read and Write operation on Session objects? will performance degrade..

3 Answers   Allsec Technologies,


What do you mean by serialize and marshalbyref?

0 Answers  






How many modelpopup extender we frequire when we want more than one model popup on same page ?

3 Answers   TCS,


what is the purpose of update panel control in ajax?

2 Answers   CSC,


Why we use asp.net for website development?

0 Answers  


What is the function of the CustomValidator? a) It allows for custom C# client-side code to validate entries in a control. b) It allows for a custom mixture of validator controls to use one central control for the display of messages. c) It uses scripted client-side code to validate the entry in a control. d) It uses server-side code to validate the entry in a control.

4 Answers   ABC, Syntax Softtech, TCS,


What is the difference between ExecuteReader,ExecuteNonQuery and ExecuteScalar.

8 Answers  


What are the advantages of using sql stored procedures instead of adhoc sql queries in an asp.net web application?

0 Answers  


What is & in a url?

0 Answers  


Categories