Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to get to Cache from Class

Reply
Thread Tools

How to get to Cache from Class

 
 
Keith Chadwick
Guest
Posts: n/a
 
      11-04-2003
Need some help on access the httpApplication cache.

I was informed to use the application cache over the old application object
and also to use a classes versus modules.

do I need to Imprt System.Web.HttpApplication into the class?

do I need to dim x as System.Web.Application then use
x.context.cache.item("myitem")=myobject

How exactly do I get to the application cache from within a class as none of
the above seems to work?

Thanks
Keith


 
Reply With Quote
 
 
 
 
Dino Chiesa [Microsoft]
Guest
Posts: n/a
 
      11-05-2003
http://samples.gotdotnet.com/quickst...tacaching.aspx

"Keith Chadwick" <(E-Mail Removed)> wrote in message
news:ez$(E-Mail Removed)...
> Need some help on access the httpApplication cache.
>
> I was informed to use the application cache over the old application

object
> and also to use a classes versus modules.
>
> do I need to Imprt System.Web.HttpApplication into the class?
>
> do I need to dim x as System.Web.Application then use
> x.context.cache.item("myitem")=myobject
>
> How exactly do I get to the application cache from within a class as none

of
> the above seems to work?
>
> Thanks
> Keith
>
>



 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      11-05-2003
The Application Cache is a property of the Current HttpContext. When
referring to the Application Cache in a Page, you can simply refer to
"Cache," as it is a property of the Page class If you are referring to the
Application Cache in a class that is not a Page or HttpHandler, but is used
by one, you can refer to "HttpContext.Current.Cache."

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.

"Keith Chadwick" <(E-Mail Removed)> wrote in message
news:ez$(E-Mail Removed)...
> Need some help on access the httpApplication cache.
>
> I was informed to use the application cache over the old application

object
> and also to use a classes versus modules.
>
> do I need to Imprt System.Web.HttpApplication into the class?
>
> do I need to dim x as System.Web.Application then use
> x.context.cache.item("myitem")=myobject
>
> How exactly do I get to the application cache from within a class as none

of
> the above seems to work?
>
> Thanks
> Keith
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET Cache vs Window System Cache Sergey via DotNetMonster.com ASP .Net 0 11-15-2006 03:33 PM
client-side cache vs server-side cache vs ajax vs asp.net callback =?Utf-8?B?b25l?= ASP .Net 1 03-08-2006 12:25 PM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
Page.Cache vs HttpContext.Current.Cache DesignerX ASP .Net 5 01-20-2004 10:55 PM
Cache::Cache Stale Segments Jeff Nokes Perl 0 09-30-2003 04:34 PM



Advertisments