PackageTrack
Sign in Get early access

friendsofsymfony/http-cache

Tools to manage HTTP caching proxies with PHP

3.2.0 16M downloads/mo #1569 most downloaded on Packagist FriendsOfSymfony/FOSHttpCache

What this package is like to depend on

Last release 5 months ago

04 Mar 2026

Release timing varies

gaps range from 9 days to 11 months

Nearly every release is documented

notes for 56 of 60 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

70 releases · first in 2014

2 releases in the last 12 months

see the full history below

Release timeline

69 releases · Mar 2014 to Mar 2026
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 60 of 70
  1. 3.2.0 04 Mar 2026
    Release notes
    • Added support for prefix invalidation, a special case of banning for cloudflare enterprise.
    Open source →
    Release notes
    • Added support for prefix invalidation, a special case of banning for cloudflare enterprise.
    Open source →
  2. 3.1.2 03 Dec 2025
    Release notes
    • Compatible with Symfony 8.
    • Testing with PHP 8.5.
    Open source →
    Release notes
    • Compatible with Symfony 8.
    • Testing with PHP 8.5.
    Open source →
  3. 3.1.1 17 Jun 2025
    Release notes

    Varnish Cache

    • Fixed banPath to escape array of host names to be a correct regular expression.
    Open source →
    Release notes

    Varnish Cache

    • Fixed banPath to escape array of host names to be a correct regular expression.
    Open source →
  4. 3.1.0 24 Jul 2024
    Release notes

    Symfony HttpCache

    • Add events PRE_FORWARD and POST_FORWARD to allow event listeners to alter
      the request before and after it is sent to the backend.
    • Changed CustomTtlListener to use the POST_FORWARD event instead of
      PRE_STORE. Using PRE_STORE, requests that are not considered cacheable by
      Symfony were never cached, even when they had a custom TTL header.
    • Add flag fallbackToSmaxage to CustomTtlListener to allow controlling
      fallback to s-maxage if custom TTL header is not defined on the response.
    • Fix: Do not call store if Response object is not longer cacheable after event
      listeners. If you use the custom TTL system, this is only a performance
      improvement, because the TTL of the response would still be 0. With a custom
      listener that changes the response explicitly to not be cached but does not
      change s-maxage, this bug might have led to caching responses that should not
      have been cached.
    Open source →
    Release notes

    Symfony HttpCache

    • Add events PRE_FORWARD and POST_FORWARD to allow event listeners to alter the request before and after it is sent to the backend.
    • Changed CustomTtlListener to use the POST_FORWARD event instead of PRE_STORE. Using PRE_STORE, requests that are not considered cacheable by Symfony were never cached, even when they had a custom TTL header.
    • Add flag fallbackToSmaxage to CustomTtlListener to allow controlling fallback to s-maxage if custom TTL header is not defined on the response.
    • Fix: Do not call store if Response object is not longer cacheable after event listeners. If you use the custom TTL system, this is only a performance improvement, because the TTL of the response would still be 0. With a custom listener that changes the response explicitly to not be cached but does not change s-maxage, this bug might have led to caching responses that should not have been cached.
    Open source →
  5. 3.0.0 04 May 2024
    Release notes
    • Support Symfony 7
    • Drop support for Symfony < 6.4
    • Test with PHP 8.2 and 8.3
    • Drop support for PHP < 8.1
    • Switched to PSR-17 message factories
    • Switched some places to PSR-18 HTTP client. The main functionality needs the Httplug Async Client specification. There is no PSR for asynchronous clients.
    • Parameter and return type declarations where possible.
    • Ignore empty tag lists passed to TagCapable::invalidateTags so you don't need to check if there are tags or not.
    Open source →
    Release notes
    • Support Symfony 7
    • Drop support for Symfony < 6.4
    • Test with PHP 8.2 and 8.3
    • Drop support for PHP < 8.1
    • Switched to PSR-17 message factories
    • Switched some places to PSR-18 HTTP client. The main functionality needs the Httplug Async Client specification. There is no PSR for asynchronous clients.
    • Parameter and return type declarations where possible.
    • Ignore empty tag lists passed to TagCapable::invalidateTags so you don't need to check if there are tags or not.

    2.x

    Open source →
  6. 2.16.2 02 Aug 2024
    Release notes

    Fixed

    • The new EventDispatchingHttpCache::forward method added in 2.16.0 was not
      compatible with Symfony 4.4. Adjusted the signature to make it compatible.
    Open source →
    Release notes

    Fixed

    • The new EventDispatchingHttpCache::forward method added in 2.16.0 was not compatible with Symfony 4.4. Adjusted the signature to make it compatible.
    Open source →
  7. 2.16.1 24 Jul 2024
    Release notes

    (Mistake, same as 2.16.0)

    Open source →
    Release notes

    (Mistaken tag, same as 2.16.0)

    Open source →
  8. 2.16.0 24 Jul 2024
    Release notes

    Symfony HttpCache

    • Add events PRE_FORWARD and POST_FORWARD to allow event listeners to alter
      the request before and after it is sent to the backend.
    • Changed CustomTtlListener to use the POST_FORWARD event instead of
      PRE_STORE. Using PRE_STORE, requests that are not considered cacheable by
      Symfony were never cached, even when they had a custom TTL header.
    • Add flag fallbackToSmaxage to CustomTtlListener to allow controlling
      fallback to s-maxage if custom TTL header is not defined on the response.
    • Fix: Do not call store if Response object is not longer cacheable after event
      listeners. If you use the custom TTL system, this is only a performance
      improvement, because the TTL of the response would still be 0. With a custom
      listener that changes the response explicitly to not be cached but does not
      change s-maxage, this bug might have led to caching responses that should not
      have been cached.
    Open source →
    Release notes

    Symfony HttpCache

    • Add events PRE_FORWARD and POST_FORWARD to allow event listeners to alter the request before and after it is sent to the backend.
    • Changed CustomTtlListener to use the POST_FORWARD event instead of PRE_STORE. Using PRE_STORE, requests that are not considered cacheable by Symfony were never cached, even when they had a custom TTL header.
    • Add flag fallbackToSmaxage to CustomTtlListener to allow controlling fallback to s-maxage if custom TTL header is not defined on the response.
    • Fix: Do not call store if Response object is not longer cacheable after event listeners. If you use the custom TTL system, this is only a performance improvement, because the TTL of the response would still be 0. With a custom listener that changes the response explicitly to not be cached but does not change s-maxage, this bug might have led to caching responses that should not have been cached.
    Open source →
  9. 2.15.3 11 Dec 2023
    Release notes
    • Avoid deprecated RequestMatcher in favor of IpsRequestMatcher.
    Open source →
    Release notes
    • Avoid deprecated RequestMatcher in favor of IpsRequestMatcher.
    Open source →
  10. 2.15.2 30 Nov 2023
    Release notes
    • Declare incompatibility with Symfony 7 because it removes RequestMatcher.
    Open source →
    Release notes
    • Declare incompatibility with Symfony 7 because it removes RequestMatcher.
    Open source →
  11. 2.15.1 17 May 2023
    Release notes
    • Directly require php-http/message-factory to keep working with the legacy factories.
    Open source →
  12. 2.15.0 01 Dec 2022
    Release notes
    • Provide a TagHeaderParser that can split up a tag header into the list of tags. This allows to correctly handle non-default tag separators in all places.
    Open source →
  13. 2.14.2 02 Nov 2022
    Release notes
    • Fixed varnish configuration examples to say Authorization and not Autorization.
    Open source →
  14. 2.14.1 07 Jul 2022
    Release notes
    • Fixed dummy interface name for code scanners to match the expected name.
    Open source →
  15. 2.14.0 06 Jul 2022
    Release notes

    Symfony Compatibility

    • Removed the internal BaseEvent class and extend our events from the Symfony contracts class directly.
    • Made the CacheInvalidation interface compatible with Symfony 6. Symfony 6 does a BC break for HttpKernelInterface::fetch - if you implement the method in your application, you need to adjust when upgrading to Symfony 6.
    Open source →
  16. 2.13.0 25 Jan 2022
    Release notes
    • Allow installation with Symfony 6 components
    • Drop support for Symfony 3, minimal version is now 4.3
    Open source →
  17. 2.12.1 16 Mar 2022
    Release notes

    Symfony Compatibility

    • Do not extend the wrong Event class when installed with legacy Symfony but the Symfony contracts happen to be installed
    Open source →
  18. 2.12.0 12 Jan 2022
    Release notes

    Cloudflare

    • Added Cloudflare ProxyClient Adapter with ClearCapable, PurgeCapable and TagCapable. This allows to use FOSHttpCache to invalidate caches on Cloudflare. See the "Proxy Client" section of the documentation for how to configure the Cloudflare client.

    Varnish Cache

    • Added a fos_user_context_hash method to be called in vcl_hash when using the user context hash mechanism. This can avoid performance problems Varnish can run into when the hash Varys on the basic authentication or session cookie. If you use the user context, read the updated documentation and call fos_user_context_hash in your vcl_hash function.

    Noop Client

    • Implemented ClearCapable.
    Open source →
  19. 2.11.0 30 Sep 2021
    Release notes

    Symfony HttpCache

    • Added flag on CustomTtlListener to allow keeping the custom TTL header on the response

    Fastly client

    • Marked the @internal constants in FOS\HttpCache\ProxyClient\Fastly as private
    Open source →
  20. 2.10.1 28 Jun 2021
    Release notes

    HttpDispatcher

    • Fix how we create exceptions to get the expected exception rather than a PHP error
    Open source →
  21. 2.10.0 02 Dec 2020
    Release notes

    General

    • Raised minimal PHP version to 7.2
    • Added support for PHP 8.0

    Symfony HttpCache

    • Added a neutral "Bad Request" body to user hash mismatch response to have something searchable in the code when debugging.
    Open source →
  22. 2.9.2 19 May 2020
    Release notes

    Proxy Client

    • Fix: Preserve inline credentials when multiplexing to the proxy servers.
    Open source →
  23. 2.9.1 07 May 2020
    Release notes

    Proxy Client

    • Allow to use inline credentials for the caching proxy URL in the format http://user:[email protected]
    Open source →
  24. 2.9.0 05 Feb 2020
    Release notes

    General

    • Raised minimal PHP version to 7.1
    • Test helper classes upgraded to support PHPUnit 7/8
    • There is no php-http/discovery package 2.0, drop it from composer.json
    • Adapt for changes to NetworkException in HTTPlug 2.1 for PSR-18 compatibility

    Symfony HttpCache

    • Fixed issue with PurgeTagsListener and Symfony 5
    • Fixed clearing the cache completely together with toflar psr6 store did not work
    Open source →
  25. 2.8.0 27 Nov 2019
    Release notes

    General

    • Support Symfony 5
    • Use LegacyEventDispatcherProxy for Symfony >= 4.3 to avoid deprecation messages.
    • Added Fastly ProxyClient Adapter with ClearCapable, PurgeCapable, RefreshCapable, & TagCapable. Fastly is a CDN originally based on Varnish 2.x, so with many of the same capabilities like VCL and more.
    Open source →
  26. 2.7.0 14 May 2019
    Release notes

    Symfony HttpCache

    • Added request type to the CacheEvent.
    Open source →
  27. 2.6.0 29 Apr 2019
    Release notes

    General

    • Added: ClearCapable to clear the whole cache in one efficient call. Currently supported only by the Symfony HttpCache.
    • Allow installing with Httplug 2.0 / PSR-18.
    Open source →
  28. 2.5.4 31 Oct 2018
    Release notes

    Symfony HttpCache

    • Fixed: Avoid regression of 2.5.3: If there are no messages to be dispatched, do not throw an exception if the HttpCache is not set.
    Open source →
  29. 2.5.3 31 Oct 2018
    Release notes

    Symfony HttpCache

    • Fixed: Handle HttpCache not available in KernelDispatcher and fix return type annotations - if HttpCache is not set, it can't be returned.
    Open source →
  30. 2.5.2 03 Oct 2018
    Release notes

    Varnish

    • Fixed: Remove the xkey header in vcl_deliver if we are not in debug mode
    • Do not cleanup the Vary header and keep the user context hash if we are in debug mode

    Cache Tagging

    • Fixed: Clear the ResponseTagger after we tagged a response. Usually PHP uses a new instance for every request. But for example the hash lookup when using Symfony HttpCache does two requests in the same PHP process.
    Open source →
  31. 2.5.1 27 Sep 2018
    Release notes

    Cache Tagging

    • Fixed: MaxHeaderValueLengthFormatter::getTagsHeaderName now actually returns the value.
    Open source →
  32. 2.5.0 10 Sep 2018
    Release notes

    Cache Tagging

    • Added: MaxHeaderValueLengthFormatter to allow splitting cache tag headers into multiple headers.

    Symfony HttpCache

    • Have cache invalidator check for presence of Psr6Store for a better guess whether the cache really is TagCapable or not.
    Open source →
  33. 2.4.0 30 Jul 2018
    Release notes

    Symfony HttpCache

    • Added: CleanupCacheTagsListener to remove the cache tags header from the final response that is sent to the client. Add this listener to your cache kernel.

    Cache Tagging

    • Improved: The ResponseTagger does now remove duplicate tags.
    Open source →
  34. 2.3.1 06 Jul 2018
    Release notes

    Varnish

    • Fixed: Do not preg_quote tags when using xkey. Quoting is only used for BAN requests that expect a regular expression. This bug only affected you if you use xkey and used characters in your tags that are changed by preg_quote.
    Open source →
  35. 2.3.0 24 Apr 2018
    Release notes

    ProxyClient

    • The HttpProxyClient now accepts an instance of the new Dispatcher interface instead of the concrete HttpDispatcher, allowing for more flexibility.

    Symfony

    • Introduced a new KernelDispatcher for the Symfony proxy that calls the application kernel directly instead of executing a full HTTP request.
    Open source →
  36. 2.2.1 27 Mar 2018
    Release notes

    Varnish

    • The provided VCL for custom TTL no longer provides import std; because each import may only exist once.
    Open source →
  37. 2.2.0 23 Mar 2018
    Release notes

    Varnish

    • Added support for the more efficient xkey cache tag system. BAN remains the default cache tagging system, but if you can install the varnish modules in your system, it is recommended to update to xkey.
    • No inline C is needed for the custom TTL header with Varnish 4 or better. use std.duration() instead.

    Symfony user context

    • You can now also specify which headers are used for authentication to detect anonymous requests. By default, the headers are the previously hardcoded Authorization, HTTP_AUTHORIZATION and PHP_AUTH_USER.
    Open source →
  38. 2.1.3 15 Mar 2018
    Release notes

    Symfony HttpCache

    • Fixed bug in Symfony tag invalidation. Do not check if host is missing in request creation.
    Open source →
  39. 2.1.2 07 Feb 2018
    Release notes

    Symfony HttpCache

    • Fixed issue with detection if toflar psr6 store is available.
    Open source →
  40. 2.1.1 01 Feb 2018
    Release notes

    Varnish

    • Updated X-Cache-Tags regex to prevent matching partial tags

      Invalidating objects with a tag of 'bar' would have previously also have invalidated objects with a tag that ends in 'bar', eg. 'foobar'. Now when invalidating an object the tag name must match in full.

    Open source →
  41. 2.1.0 19 Dec 2017
    Release notes
    • Support Symfony 4.

    Testing

    • Upgraded phpunit to 5.7 / 6. If you use anything from the FOS\HttpCache\Test namespace you need to update your project to use PHPUnit 6 (or 5.7, if you are using PHP 5.6).

    Symfony HttpCache

    • Cache tagging support for Symfony HttpCache

      Added a PurgeTagsListener for tag based invalidation with the Symfony HttpCache reverse caching proxy. This requires the newly created Toflar Psr6Store built on PSR-6 cache and supporting pruning expired cache entries.

    • Using Request::isMethodCacheable rather than Request::isMethodSafe to correctly handle OPTIONS and TRACE requests.

    Open source →
  42. 2.0.2 18 Aug 2017
    Release notes
    • Support PHP 7.2

      Avoid warning about count(null) in PHP 7.2.

    Open source →
  43. 2.0.1 23 Jun 2017
    Release notes

    Fixed

    • Ban requests now work even when no base URI is configured.
    Open source →
  44. 2.0.0 24 May 2017
    Release notes

    PHP

    • Raised minimum PHP version to 5.6.
    • BC break: Removed the Interface suffix from all interfaces.
    • BC break: Renamed HashGenerator to DefaultHashGenerator.
    • Added HashGenerator interface.

    HTTP

    • BC break: Replaced hard coupling on Guzzle HTTP client with HTTPlug. You now need to explicitly specify a supported HTTP adapter in composer.json; see installation instructions.
    • BC break: Separated the HttpDispatcher from the proxy clients. All existing clients still use HTTP to send invalidation requests.
    • Added support and documentation for setting a custom TTL specifically for the caching proxy.

    Logging

    • BC break: Renamed the log event listener from LogSubscriber to LogListener.

    Proxy clients

    • BC break: Renamed the Ban, Purge, Refresh and Tag interfaces to BanCapable, PurgeCapable, RefreshCapable and TagCapable.

    Tagging

    • BC break: Moved tag invalidation to CacheInvalidator, and renamed TagHandler to ResponseTagger.
    • Abstracting tags by adding new TagCapable for ProxyClients.
    • Added strict option to ResponseTagger that throws an exception when empty tags are added. By default, empty tags are ignored.
    • Added TagHeaderFormatter interface that is used within the ResponseTagger to provide the header name and for formatting the tags header value.

    Varnish

    • Varnish configuration are now files that you can directly include from your .vcl and call custom functions to avoid copy-pasting VCL code.
    • Added support for and changed default to Varnish version 5.
    • Moved Varnish 4 and 5 configuration files from resources/config/varnish-4/ to resources/config/varnish/.
    • Changed default Varnish version to 5.
    • Removed special case for anonymous users in user context behaviour. Varnish now does a hash lookup for anonymous users as well.

    NGINX

    • The NGINX purge location is no longer passed as constructor argument but by calling setPurgeLocation().

    Symfony HttpCache

    • BC break: Renamed all event listeners to XxListener instead of XxSubscriber.
    • BC break: Constructors for PurgeListener and RefreshListener now use an options array for customization.
    • BC break: Converted abstract event dispatching kernel class EventDispatchingHttpCache to a trait, which now provides the addSubscriber and addListener methods. In your AppCache, replace AppCache extends EventDispatchingHttpInterface with a use EventDispatchingHttpCache; statement.
    • The user context by default does not use a hardcoded hash for anonymous users but does a hash lookup. You can still configure a hardcoded hash.

    Testing

    • BC break: Refactored the proxy client test system into traits. Removed ProxyTestCase; use the traits CacheAssertions and HttpCaller instead.
    • Added HTTP method parameter to HttpCaller::getResponse().
    Open source →
  45. 2.0.0-beta3 no date pre-release
    Release notes
    • BC break: The ResponseTagger no longer expects an instance of TagCapable as first argument. To adjust the tag header name or the way the tags are formatted, use the new header_formatter option with a TagHeaderFormatter.
    Open source →
  46. 2.0.0-beta2 12 Mar 2017 pre-release

    Nothing published for this version

  47. 2.0.0-beta1 03 Feb 2017 pre-release

    Nothing published for this version

  48. 2.0.0-alpha1 15 Nov 2016 pre-release

    Nothing published for this version

  49. 1.4.6 16 Jul 2020
    Release notes
    • [Symfony HttpCache] Added a neutral "Bad Request" body to user hash mismatch response to have something searchable in the code when debugging.
    Open source →
  50. 1.4.5 17 Mar 2018
    Release notes
    • Symfony user context: You can now also specify which headers are used for authentication to detect anonymous requests. By default, the headers are the previously hardcoded Authorization, HTTP_AUTHORIZATION and PHP_AUTH_USER.
    Open source →
  51. 1.4.4 09 Oct 2017
    Release notes
    Open source →
  52. 1.4.3 18 Aug 2017
    Release notes
    • Avoid warning about count(null) in PHP 7.2.
    Open source →
  53. 1.4.2 02 Feb 2016
    Release notes
    • The TagHandler constructor now accepts a headerLength argument which will cause its invalidateTags function to invalidate in batches if the header length exceeds this value.
    Open source →
  54. 1.4.1 07 Dec 2015
    Release notes
    • Support for Symfony 3.
    Open source →
  55. 1.4.0 02 Jun 2015
    Release notes
    Open source →
  56. 1.3.2 08 May 2015
    Release notes
    • Added TagHandler->hasTags() method.
    Open source →
  57. 1.3.1 01 Apr 2015
    Release notes
    • Added authentication support to user context subscribe.
    • Fixed usage of deprecated Guzzle subtree splits.
    • Fixed exposed cache tags.
    Open source →
  58. 1.3.0 13 Feb 2015
    Release notes
    • Added TagHandler.
    • It is no longer possible to change the event dispatcher of the CacheInvalidator once its instantiated. If you need a custom dispatcher, set it right after creating the invalidator instance.
    • Deprecated CacheInvalidator::addSubscriber in favor of either using the event dispatcher instance you inject or doing getEventDispatcher()->addSubscriber($subscriber).
    Open source →
  59. 1.2.0 17 Jan 2015
    Release notes
    • Added support for the symfony/http-kernel component reverse proxy HttpCache.
    Open source →
  60. 1.1.2 21 Nov 2014
    Release notes
    • Fixed documentation for user context varnish configuration to also work when client omits the Accept HTTP header.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive