Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old March 17th, 2008, 11:39 PM
Newbie
 
Join Date: Aug 2007
Posts: 29
Default .NET Caching and App Pools

Hi,

As far as .NET caching goes on IIS, if 2 .NET websites are in the same app pool can they access the same cache items (Using HttpContext.Current.Cache) ? Or is this cache collection always seperate for each .NET application?

Cheers
Reply
  #2  
Old March 18th, 2008, 01:39 PM
kenobewan's Avatar
Moderator
 
Join Date: Dec 2006
Posts: 4,664
Default

Here is an article that may help:
IIS and ASP.NET: The Application Pool
Reply
  #3  
Old March 19th, 2008, 05:53 AM
Newbie
 
Join Date: Aug 2007
Posts: 29
Default

Thanks, I did read that but it didn't fully delve into what I was after. I have learnt, though, that this is not possible.

Is there a way, then, of two different projects being able to manipulate the Cache items of one another? For example, say there is a .NET website and a .NET admin section for that website. The dream is to have the 2 as seperate projects so that a deploy of the website doesn't mean a deploy of the admin, and vice versa. The problem, however, is that the admin system needs to update / remove Cache items that the website accesses... Is there any way to do this? Or must they both exist within the same project (application) in order to modify the Cache for each other?
Reply
  #4  
Old March 19th, 2008, 01:30 PM
kenobewan's Avatar
Moderator
 
Join Date: Dec 2006
Posts: 4,664
Default

Quote:
Originally Posted by Murdz
Thanks, I did read that but it didn't fully delve into what I was after. I have learnt, though, that this is not possible.

Is there a way, then, of two different projects being able to manipulate the Cache items of one another? For example, say there is a .NET website and a .NET admin section for that website. The dream is to have the 2 as seperate projects so that a deploy of the website doesn't mean a deploy of the admin, and vice versa. The problem, however, is that the admin system needs to update / remove Cache items that the website accesses... Is there any way to do this? Or must they both exist within the same project (application) in order to modify the Cache for each other?
Easier to stick with the one project and probably more secure.
Reply
  #5  
Old March 24th, 2008, 05:24 AM
Newbie
 
Join Date: Aug 2007
Posts: 29
Default

Double post, see below.

Last edited by Murdz; March 24th, 2008 at 05:31 AM. Reason: Double post
Reply
  #6  
Old March 24th, 2008, 05:29 AM
Newbie
 
Join Date: Aug 2007
Posts: 29
Default

Cheers.

The only other option that I can really think about, aside from reading some DB value (as the whole point of caching is to avoid DB calls) is to have a CacheDependency on a file and simply update that file through the admin system; thus the cache for the website will expire.
Reply
  #7  
Old March 24th, 2008, 12:23 PM
kenobewan's Avatar
Moderator
 
Join Date: Dec 2006
Posts: 4,664
Default

Another way may be using a class library. If the classes or configs are shared, then you may be able to control caching across two applications. An even easier way may be to reference a client side file in both apps that does this job. Never used this approach, so just a suggestion. HTH.
Reply
  #8  
Old March 29th, 2008, 02:55 AM
Newbie
 
Join Date: Aug 2007
Posts: 29
Default

Interesting.

Cheers kenobewan.
Reply
Reply

Bookmarks

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 Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles