[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.caching

using cache in a class library (.Net 2.0

guillaume StEtienne FR

4/29/2005 1:24:00 PM

obvioulsy, caching technique had been tremendously simplified & imporved in
..Net 2.0
but the assembly System.Web.Caching seems to be allowed only in a Web
Project

how about taking advantage of Caching and of that POO simple rule: create a
class library that can be called from a HttpApplication (WebForm for example).

it just a matter of context, but without a reference to System.Web.Caching
, nothing works.

any idea?
2 Answers

Brock Allen

4/29/2005 2:49:00 PM

0

You can use the cache from non-web applications. Just use the HttpRuntime.Cache
static property. And yes, you need a reference to System.Web.dll.

-Brock
DevelopMentor
http://staff.develop....



> obvioulsy, caching technique had been tremendously simplified &
> imporved in
> .Net 2.0
> but the assembly System.Web.Caching seems to be allowed only in a
> Web
> Project
> how about taking advantage of Caching and of that POO simple rule:
> create a class library that can be called from a HttpApplication
> (WebForm for example).
>
> it just a matter of context, but without a reference to
> System.Web.Caching , nothing works.
>
> any idea?
>



guillaume StEtienne FR

5/2/2005 8:29:00 AM

0

I''m the dumb

I just forgot to reference System.web.dll

my unfortune is due that the assembly "System.Web" already appears in my
heading declarations without having to reference System.web.dll

How? beceause another assembly to wich I have a reference is bind to that
dll. Thus the dependencies seems to be transitive in .Net 2.0 from an
assembly to another.


"guillaume StEtienne FR" wrote:

> obvioulsy, caching technique had been tremendously simplified & imporved in
> .Net 2.0
> but the assembly System.Web.Caching seems to be allowed only in a Web
> Project
>
> how about taking advantage of Caching and of that POO simple rule: create a
> class library that can be called from a HttpApplication (WebForm for example).
>
> it just a matter of context, but without a reference to System.Web.Caching
> , nothing works.
>
> any idea?