Cache question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?c29ubnk=?=

    #1

    Cache question

    Does the Cache object work in a webfarm with SessionState being?

    Is there a better way to store application wide data?

    thx...sonny
  • Peter  Bromberg [C# MVP]

    #2
    Re: Cache question

    Cache is machine specific. If you are working with a webfarm, you will need
    to use an appropriate service on at least one of the farm machines to handle
    caching "across the farm". There is a nice .NET implementation of Memcached
    server that you can find on codeplex.com, along with Session and Cache
    managed provider code.
    --Peter

    "sonny" <sonny@discussi ons.microsoft.c omwrote in message
    news:67C631C6-67B8-41DB-A291-5A8D12C5EC17@mi crosoft.com...
    Does the Cache object work in a webfarm with SessionState being?
    >
    Is there a better way to store application wide data?
    >
    thx...sonny

    Comment

    • =?Utf-8?B?c29ubnk=?=

      #3
      Re: Cache question

      Thanks Peter, I'll check it out.

      A follow up question, does the same go for the Application object?

      "Peter Bromberg [C# MVP]" wrote:
      Cache is machine specific. If you are working with a webfarm, you will need
      to use an appropriate service on at least one of the farm machines to handle
      caching "across the farm". There is a nice .NET implementation of Memcached
      server that you can find on codeplex.com, along with Session and Cache
      managed provider code.
      --Peter
      >
      "sonny" <sonny@discussi ons.microsoft.c omwrote in message
      news:67C631C6-67B8-41DB-A291-5A8D12C5EC17@mi crosoft.com...
      Does the Cache object work in a webfarm with SessionState being?

      Is there a better way to store application wide data?

      thx...sonny
      >

      Comment

      • George Ter-Saakov

        #4
        Re: Cache question

        Yes, pretty much any ASP.NET object (Cahce, Application,... ) will not be
        shared between different machines.

        Session is the only exception and only if you configure to be shareable (ie
        use SQL server, or Session State service).

        You need to use something custom written to share application stored
        variables. Peter mentioned Memcached server on codeplex.com . I would start
        there (although never worked with it).

        George.


        "sonny" <sonny@discussi ons.microsoft.c omwrote in message
        news:E90FAA6B-5E50-4F22-A45F-35D447AA3400@mi crosoft.com...
        Thanks Peter, I'll check it out.
        >
        A follow up question, does the same go for the Application object?
        >
        "Peter Bromberg [C# MVP]" wrote:
        >
        >Cache is machine specific. If you are working with a webfarm, you will
        >need
        >to use an appropriate service on at least one of the farm machines to
        >handle
        >caching "across the farm". There is a nice .NET implementation of
        >Memcached
        >server that you can find on codeplex.com, along with Session and Cache
        >managed provider code.
        >--Peter
        >>
        >"sonny" <sonny@discussi ons.microsoft.c omwrote in message
        >news:67C631C 6-67B8-41DB-A291-5A8D12C5EC17@mi crosoft.com...
        Does the Cache object work in a webfarm with SessionState being?
        >
        Is there a better way to store application wide data?
        >
        thx...sonny
        >>

        Comment

        Working...