PHPackages                             webfactory/http-cache-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. webfactory/http-cache-bundle

ActiveLibrary[HTTP &amp; Networking](/categories/http)

webfactory/http-cache-bundle
============================

Symfony bundle to ease HTTP cache validation via last modified header

2.4.0(1mo ago)216.1k↑40.6%MITPHPPHP &gt;= 8.1CI passing

Since Mar 19Pushed 1mo ago6 watchersCompare

[ Source](https://github.com/webfactory/WebfactoryHttpCacheBundle)[ Packagist](https://packagist.org/packages/webfactory/http-cache-bundle)[ RSS](/packages/webfactory-http-cache-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (12)Versions (17)Used By (0)

WebfactoryHttpCacheBundle
=========================

[](#webfactoryhttpcachebundle)

`WebfactoryHttpCacheBundle` is a Symfony bundle that features a more powerful [HTTP cache validation via the last modified header](https://symfony.com/doc/current/http_cache/validation.html#validation-with-the-last-modified-header) than the `#[Cache]` attribute contained in the [symfony/http-kernel package](https://symfony.com/doc/current/http_cache.html#http-cache-expiration-intro).

The `#[ReplaceWithNotModifiedResponse]` attribute lets you write small `LastModifiedDeterminators` for each one of the underlying resources of the requested page. They can be reused and combined freely and can even be defined as services.

Consider this controller code:

```
