Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / August 2004

Tip: Looking for answers? Try searching our database.

Application state vs. Cache API

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel Walzenbach - 10 Jul 2004 04:32 GMT
Hi,

I need to cache infrequently changed data used by the entire application.
Does anybody know whether using Application state
(Application["YourGlobalState"] = somevalue;) or the Cache API
(Cache.Insert) is more preferable?

Thanks a lot

  Daniel
Scott Allen - 10 Jul 2004 06:59 GMT
The cache object is more flexible in the long run. You can set a
duration and a priority for the cached item, for instance.

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

>Hi,
>
[quoted text clipped - 6 lines]
>
>   Daniel
Paul Glavich [MVP - ASP.NET] - 10 Jul 2004 09:38 GMT
The cache is good, but it is considered volatile. There is never any
guarantee that the data is there. The item may be removed when it expires or
some condition is met (something you explicitly set), or the runtime may
remove the item when memory gets low. In contrast, the application variables
are there for the duration of the applications life, unless explicitly
removed by you and it provides methods to synchronise access to the
varibales as well. (.Lock for example).

Signature

- Paul Glavich
Microsoft MVP - ASP.NET

> The cache object is more flexible in the long run. You can set a
> duration and a priority for the cached item, for instance.
[quoted text clipped - 13 lines]
> >
> >   Daniel
Harry Simpson - 26 Aug 2004 16:37 GMT
True but as with all caching, one ALWAYS checks to see if the data is in the
cache and if not gets fresh data.  So unless connection is iffy, this really
should be a concern.

Harry

> The cache is good, but it is considered volatile. There is never any
> guarantee that the data is there. The item may be removed when it expires
[quoted text clipped - 24 lines]
>> >
>> >   Daniel

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.