Facebook Twitter Instagram YouTube LinkedIn WhatsApp
    Facebook Twitter Instagram LinkedIn WhatsApp
    ZaveRizwanZaveRizwan
    Subscribe
    • Home
    • Features
      • Example Post
      • Typography
      • Contact
      • View All On Demos
    • Mobiles
    • Typography
    • Mobiles
      • Tech
      • Gadgets
      • Insights
    • Buy Now
    ZaveRizwanZaveRizwan
    Behavior

    Cache HTTP Error Responses

    zaiveeBy zaiveeFebruary 6, 2023No Comments2 Mins Read

    Cache error responses from the origin to reduce traffic when content isn’t available. With this behavior enabled, you can reduce the network traffic to your origin by caching HTTP error responses on the edge.

    How it works

    This behavior caches HTTP error responses with status codes 204, 305, 400, 404, 405, 501, 502, 503, 504, and 505 on the edge servers. When end-users request unavailable content, the edge server pulls the error response from the cache. By default, error responses with HTTP codes 204, 305, 404, and 405 are cached for 10 seconds, and this feature allows you to modify the caching time.

    Features and options

    Field What it does
    Enable Enables or disables this behavior.
    Max-age Set the maximum time that cached objects can remain in the cache. A setting of 0 means no-cache, which forces revalidation before serving the content. Be aware that no-cache can cause a large increase in traffic to the origin in circumstances where that would be counterproductive (for example, when the origin is returning 500 errors).
    Preserve Stale Objects When enabled, edge servers keep and serve stale cached objects when serving responses with status codes 400, 500, 502, 503, and 504, so that end-user clients can access content during transient errors without re-fetching and re-caching content from the origin.

    Related Posts

    webdav

    February 6, 2023

    modifyIncomingResponseHeader

    February 6, 2023

    g2oheader

    February 6, 2023
    Add A Comment

    Leave A Reply Cancel Reply

    © 2023 ZaveRizwan. Designed by ZaveRizwan.
    • Home
    • Tech
    • Gadgets
    • Mobiles
    • Buy Now

    Type above and press Enter to search. Press Esc to cancel.