473,399 Members | 3,603 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,399 software developers and data experts.

Difference between data cache and static variables???

Howdy All"

Other then the automatic expiration stuff that you can set when using the
data cache, what the the technical advantages of using the data cache versus
static application variables?

Testing has shown about the same behavior, am I missiing something??

Thanks
--
Patrick
Nov 19 '05 #1
3 2751
The cache is thead-safe, while reading / writing a static reference
variable is not (at least not without some additional work). Note that
the objects in the cache may not be thread safe, but the cache
collection itself is.

That's one difference.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Sun, 5 Jun 2005 17:54:01 -0700, "inetmug"
<in*****@discussions.microsoft.com> wrote:
Howdy All"

Other then the automatic expiration stuff that you can set when using the
data cache, what the the technical advantages of using the data cache versus
static application variables?

Testing has shown about the same behavior, am I missiing something??

Thanks


Nov 19 '05 #2
By "data cache" are you referring the the Application Cache?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"inetmug" <in*****@discussions.microsoft.com> wrote in message
news:25**********************************@microsof t.com...
Howdy All"

Other then the automatic expiration stuff that you can set when using the
data cache, what the the technical advantages of using the data cache
versus
static application variables?

Testing has shown about the same behavior, am I missiing something??

Thanks
--
Patrick

Nov 19 '05 #3
I have alwasys seen it as the data cache, I guess it would be the application
cache. As Scott pointed out, it is sycnronized under the covers.

Referencd like this...

Cache["Channel"] = chnl;

--
Patrick
"Kevin Spencer" wrote:
By "data cache" are you referring the the Application Cache?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.

"inetmug" <in*****@discussions.microsoft.com> wrote in message
news:25**********************************@microsof t.com...
Howdy All"

Other then the automatic expiration stuff that you can set when using the
data cache, what the the technical advantages of using the data cache
versus
static application variables?

Testing has shown about the same behavior, am I missiing something??

Thanks
--
Patrick


Nov 19 '05 #4

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

Similar topics

9
by: J. Baute | last post by:
I'm caching data in the Application object to speed up certain pages on a website The main reason is that the retrieval of this data takes quite a while (a few seconds) and fetching the same data...
79
by: Me | last post by:
Just a question/observation out of frustration. I read in depth the book by Peter Van Der Linden entitled "Expert C Programming" (Deep C Secrets). In particular the chapters entitled: 4: The...
1
by: Ryan | last post by:
The real reason for my previous post about intercepting Application_EndRequest (from outside of Global.asax) is because of a need to create a "non persistent page level cache". I can't seem to...
0
by: Chris Snyder | last post by:
I have a page that displays real-time data (road sensors updated every 5 minutes), but the query to display the data takes 15-20 seconds (big table in a DB w/o indexes, not my fault). This is...
2
by: Wysiwyg | last post by:
I was hoping to get some opinions on the efficiency of various methods of reusing the same dropdown list data. Here is the situation: Multiple panels on maintenance pages with TAB menus across...
28
by: Dennis | last post by:
I have a function which is called from a loop many times. In that function, I use three variables as counters and for other purposes. I can either use DIM for declaring the variables or Static. ...
4
by: DylanM | last post by:
I've seen a few examples on how to cache data in a WinForms GUI, just after some thought on the best solution. The data I'm trying to cache will be generally be small collections of Business...
0
by: Ayoa | last post by:
I have a c# assembly which i have exposed to a VB COM object. Within the c# assembly, i implemented a singleton pattern which loads the cached from the database if the cache is null. This data does...
3
by: Yourself | last post by:
Hi, I'm trying to post data to PayPal for a shopping cart, basically I want to replicate a form like the following, but create the variables dynamically from code behind: <form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.