471,350 Members | 1,105 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Context.Items vs Context.Cache

There doesn't seem to be much doc on Items vs Cache in HttpContext.

Basically I want to instantiate a class at web application level so
that all web pages can have access to it. The object would have the
life span of the application itself.

Can anyone point me in right direction regarding Items vs Cache?

Richard

Dec 29 '05 #1
1 4941
Hello!

The Context.Items should be seen as shortlived data store (cache), that
exists for a single http request. This means it is private to the http
request.

The Context.Cache is a shared data store, that allows you to e.g.
instantiate your class at application level, add it to the cache (with
expiration settings if required), and share the instance between all http
requests.

If this doesn't answer your question, please let me know.

--
With regards
Anders Borum / SphereWorks
Microsoft Certified Professional (.NET MCP)
Dec 30 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Dennis C. Drumm | last post: by
7 posts views Thread by Mike | last post: by
4 posts views Thread by Guadala Harry | last post: by
8 posts views Thread by Steph | last post: by
4 posts views Thread by nicholas | last post: by
1 post views Thread by goRide | last post: by

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.