Accessing Web Application Cache in Class Library

F

Fred Nelson

Hi:

Newby Question (hopefully):

I would very much like to be able to read and update application cache
values directly in a class library. I have added the reference to my
class lib:

using System.Web.Caching;

however this doesn't work - is there a way to do this?

The command:

Cache["mykey"] = "my string value"

Generates the following error in my class lib:

'System.Web.Caching.Cache is a type but is used like a variable'

however it works just fine when coded on web forms.

Any help would be appreciated!

Thanks very much!

Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top