locked
Caching in WCF service -- best practice RRS feed

  • Question

  • Hi

    I need to implement a caching framwork for WCF service.

    What is the best practice for implementing caching in WCF service.

    WCF service can be hosted in IIS or selfHosted. It mainly needs to cache Domain Objects.

    Regards

    Tanvir


    Tanvir Huda
    Wednesday, February 2, 2011 5:51 AM

Answers

  • Also, if you're working on a REST service, you can leverage ASP.NET output cache (and even the AppFabric output cache provider): http://msdn.microsoft.com/en-us/library/ee230443.aspx.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    • Marked as answer by Yi-Lun Luo Wednesday, February 9, 2011 9:25 AM
    Thursday, February 3, 2011 2:33 AM
  • On 2/2/2011 12:51 AM, Tanvir Huda wrote:
    > Hi
    >
    > I need to implement a caching framwork for WCF service.
    >
    > What is the best practice for implementing caching in WCF service.
    >
    > WCF service can be hosted in IIS or selfHosted. It mainly needs to cache
    > Domain Objects.
    >
     
    http://msdn.microsoft.com/en-us/library/ee230443.aspx
     
    Then you can use HttpContext.Current.Cache with the ASP.NET WCF Web
    service.
     
    http://www.csharpfriends.com/articles/getarticle.aspx?articleid=411
     
     
    • Marked as answer by Yi-Lun Luo Wednesday, February 9, 2011 9:25 AM
    Wednesday, February 2, 2011 6:40 AM

All replies

  • On 2/2/2011 12:51 AM, Tanvir Huda wrote:
    > Hi
    >
    > I need to implement a caching framwork for WCF service.
    >
    > What is the best practice for implementing caching in WCF service.
    >
    > WCF service can be hosted in IIS or selfHosted. It mainly needs to cache
    > Domain Objects.
    >
     
    http://msdn.microsoft.com/en-us/library/ee230443.aspx
     
    Then you can use HttpContext.Current.Cache with the ASP.NET WCF Web
    service.
     
    http://www.csharpfriends.com/articles/getarticle.aspx?articleid=411
     
     
    • Marked as answer by Yi-Lun Luo Wednesday, February 9, 2011 9:25 AM
    Wednesday, February 2, 2011 6:40 AM
  • Also, if you're working on a REST service, you can leverage ASP.NET output cache (and even the AppFabric output cache provider): http://msdn.microsoft.com/en-us/library/ee230443.aspx.
    Lante, shanaolanxing This posting is provided "AS IS" with no warranties, and confers no rights.
    Windows Azure Technical Forum Support Team Blog
    • Marked as answer by Yi-Lun Luo Wednesday, February 9, 2011 9:25 AM
    Thursday, February 3, 2011 2:33 AM