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 / September 2004

Tip: Looking for answers? Try searching our database.

Maintaining one cache object per user??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ravi kumar - 21 Sep 2004 07:37 GMT
Hi All

In my application i would like to maintain cache object per user?so in my
code i have written code as
Cache objUser = new Cache();
and objUser.Insert("key","value);
when i am executing i am getting error at objUser.Insert("key","value); line
My question can i create a cache object per user?

When i can create Cache object (objUser),Why cannot i access the insert
method?

If not please suggest any possible alternate solution

Thanks and Regards
Ravi
Joerg Jooss - 21 Sep 2004 08:17 GMT
> Hi All
>
[quoted text clipped - 8 lines]
> When i can create Cache object (objUser),Why cannot i access the
> insert method?

I don't think System.Web.Caching.Cache is meant to be constructed by user
code. Its constructor is public but not documented, nor any of its internal
methods like SetCacheInternal() that probably need to be called.

> If not please suggest any possible alternate solution

In ASP.NET, either use HttpSessionState or an object that encapsulates all
data per user and put this object in the cache, using some unique property
of a user as its key.

Cheers,

Signature

Joerg Jooss
joerg.jooss@gmx.net

Ravi kumar - 21 Sep 2004 10:01 GMT
Hi joerg
Then the methods in the Cache object could be made as static isn't it?
Thanks and Regards
Ravi

> > Hi All
> >
[quoted text clipped - 20 lines]
>
> Cheers,
Joerg Jooss - 21 Sep 2004 15:29 GMT
> Hi joerg
> Then the methods in the Cache object could be made as static isn't it?

Not really. Just because user code isn't meant to create instances, this
doesn't mean the same applies to application frameworks like ASP.NET.

Cheers,

Signature

Joerg Jooss
joerg.jooss@gmx.net


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.