Results 1 to 3 of 3

Thread: How to keep an object in memory for life of web app?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2000
    Posts
    1,091

    How to keep an object in memory for life of web app?

    I want to try and implement my own caching framework in ASP.NET, not using built in caching. As a simple example, is there anyway to place some arbitrary object in memory (a single object, or maybe a List <of T>), and have it available to anyone accessing a web page on the site at any time?

    Visual Studio 2010

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: How to keep an object in memory for life of web app?

    1) static variable
    2) Cache object
    3) Application variable

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: How to keep an object in memory for life of web app?

    Hey,

    There is quite a lengthy discussion between Static and Application variables here:

    http://lanitdev.wordpress.com/2009/0...es-in-asp-net/

    That you might find of interest. And there is another discussion here:

    http://weblogs.asp.net/plip/archive/.../01/40526.aspx

    Hope that helps!!

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width