Skip to content

Cookbook: HTTP Cache.. Varnish seems to not support etag headers #4118

@awdng

Description

@awdng

The cookbook states the following on Cache Invalidation
You should never need to invalidate cached data because invalidation is already taken into account natively in the HTTP cache models. If you use validation, you never need to invalidate anything by definition; and if you use expiration and need to invalidate a resource, it means that you set the expires date too far away in the future.

It recommends to use eTags/Last Modified headers instead. I could not get that to work with varnish and stumbled on this forum message: https://www.varnish-cache.org/forum/topic/2794

Also the FOSHttpCacheBundle seems to be built completely around Cache invalidation, there is not a word about Cache Validation using etags/last modified headers in their docs at http://foshttpcachebundle.readthedocs.org/en/latest/

So, i am mildly confused by this and what the recommended/best practice is and if the docs need to reflect that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions