3.2.5.Caching

  • Negative impact of statelessness

    • Negative impact on performance

    • Chattiness

    • Higher data traffic (impact's scalability)

  • Caching

    • Counterbalances the statelessness

    • May occur on server, client or mid tier (intermediaries)

    • Response messages from the service to its consumers must be explicitly labeled as cacheable or non-cacheable

      • Caching is controlled by the server using the HTTP headers

        • Cache-Control

          • Cache policy directive - Who, How long, Under what conditions. e.g., private;max-age = 60

        • Expires

          • Tells when the resource will get expired

        • Last-Modified

          • Tells when the resource was last changed

        • ETag

          • Unique identified associated with a response

Last updated

Was this helpful?