Skip to content

[HttpKernel] Post request with HttpCache should not invalidate cache #48301

Open
@shyim

Description

@shyim

Description

Currently, all "non-safe methods" (POST) will call invalidate which bypasses the Cache (which is Okay), but calls invalidate also on the Store.

This will lead to unwanted cache invalidation, as any POST on that route clears the cache.

We use in our application an ReverseProxyStore which implements the StoreInterface to forward invalidations to external services like Varnish / Fastly. So we would like to opt out of this magic.

Idea

Add a new option invalidate_on_non_safe-method with true and allow us to disable this

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy