PackageTrack
Sign in Get early access

friendsofsymfony/http-cache-bundle

Set path based HTTP cache headers and send invalidation requests to your HTTP cache

3.4.1 14M downloads/mo #1636 most downloaded on Packagist FriendsOfSymfony/FOSHttpCacheBundle

What this package is like to depend on

Last release 2 months ago

08 Jun 2026

Ships fairly regularly

a new release about every 2 months

Most releases are documented

notes for 64 of 73 stable releases

Nothing withdrawn

no release was ever pulled

12 years old

81 releases · first in 2014

3 releases in the last 12 months

see the full history below

Release timeline

81 releases · Jun 2014 to Jun 2026
2015 2017 2019 2021 2023 2025
Release Pre-release

Releases

latest 60 of 81
  1. 3.4.1 08 Jun 2026
    Release notes
    • Fixed configuration validation to allow generate_url_type also when proxy_client.varnish.http.base_url is configured, not only when proxy_client.[client].base_url is configured.
    Open source →
    Release notes
    • Fixed configuration validation to allow generate_url_type also when proxy_client.varnish.http.base_url is configured, not only when proxy_client.[client].base_url is configured.
    Open source →
  2. 3.4.0 05 Mar 2026
    Release notes
    • Configuration for generate_url_type is now on top level instead of on the cache_manager, and applies to the InvalidationListener too.
      Configuring cache_manager.generate_url_type is deprecated and will be removed in version 4.
    Open source →
    Release notes
    • Configuration for generate_url_type is now on top level instead of on the cache_manager, and applies to the InvalidationListener too. Configuring cache_manager.generate_url_type is deprecated and will be removed in version 4.
    Open source →
  3. 3.3.0 13 Jan 2026
    Release notes
    • Compatibility with Symfony 8 (changed configuration from XML to PHP).
    • Tested with PHP 8.5.
    Open source →
    Release notes
    • Compatibility with Symfony 8 (changed configuration from XML to PHP).
    • Tested with php 8.5.
    Open source →
  4. 3.2.0 17 Jun 2025
    Release notes
    • If a custom proxy client is configured on the cache manager, the ProxyClient class is an alias to that client, to support autowiring.
    • Attribute configuration now also works on single action controllers with the __invoke method.
    • New configuration option proxy_client.*.http.request_factory and stream_factory to support custom PSR-17 HTTP request and stream factories for proxy clients.
    Open source →
    Release notes
    • If a custom proxy client is configured on the cache manager, the ProxyClient class is an alias to that client, to support autowiring.
    • Attribute configuration now also works on single action controllers with the __invoke method.
    • New configuration option proxy_client.*.http.request_factory and stream_factory to support custom PSR-17 HTTP request and stream factories for proxy clients.
    Open source →
  5. 3.1.2 12 May 2025
    Release notes
    • Fixed match_response configuration to work with Symfony 6+. #644
    • Fixed overwriting expression_language for the response matcher, due to a name mismatch the configuration was ignored. #644
    Open source →
    Release notes
    • Fixed match_response configuration to work with Symfony 6+. #644
    • Fixed overwriting expression_language for the response matcher, due to a name mismatch the configuration was ignored. #644
    Open source →
  6. 3.1.1 09 Jan 2025
    Release notes
    • Fixed regression with the extension class when ttl_header is not set.
    Open source →
    Release notes
    • Fixed regression with the extension class when ttl_header is not set.
    Open source →
  7. 3.1.0 08 Jan 2025
    Release notes
    • New Feature: allow configuring the TTL header name for the special reverse_proxy_ttl config value. #638
    Open source →
    Release notes
    • Added: cache_control.ttl_header to configure the TTL header name for the reverse_proxy_ttl cache control rule configuration. #638
    Open source →
  8. 3.0.2 06 Nov 2024
    Release notes
    • Fixed extension to depend on the DependencyInjection component rather than the HttpKernel.
    Open source →
    Release notes
    • Fixed extension to depend on the DependencyInjection component rather than the HttpKernel.
    Open source →
  9. 3.0.1 07 May 2024
    Release notes
    • Fixed regression in AttributesListener: Ignore other attributes on controller methods.
    Open source →
    Release notes
    • Fixed regression in AttributesListener: Ignore other attributes on controller methods.
    Open source →
  10. 3.0.0 04 May 2024
    Release notes
    • Minimum PHP version is now 8.1
    • Support Symfony 6.4 and 7
    • Drop obsolete annotations support, use attributes Remove all configuration you have at fos_http_cache.tags.annotations
    • Make fastly and cloudflare clients lazy loaded to support Symfony secrets that are only available at runtime, but not yet when the container is built.
    • Removed deprecated FOS\HttpCacheBundle\UserContext\AnonymousRequestMatcher, use the class from the FOSHttpCache component instead: FOS\HttpCache\UserContext\AnonymousRequestMatcher.
    • Removed obsolete ContextInvalidationLogoutHandler, use ContextInvalidationSessionLogoutHandler instead.
    • Fixed service loading to not fail when Twig is not available.

    2.x

    Open source →
  11. 2.18.0 17 Jun 2025
    Release notes
    • New configuration option proxy_client.*.http.request_factory to support custom HTTP request factories for proxy clients.
    Open source →
    Release notes
    • New configuration option proxy_client.*.http.request_factory to support custom HTTP request factories for proxy clients.
    Open source →
  12. 2.17.1 04 May 2024
    Release notes
    • Fix readthedocs build.
    Open source →
  13. 2.17.0 10 Oct 2023
    Release notes
    • Support to configure the fastly CDN client.
    Open source →
  14. 2.16.2 03 Aug 2023
    Release notes
    • Catch SessionNotFoundException in FlashMessageListener, as Symfony 6 moved from returning null to throwing an exception.
    • Add : void to commands to avoid warning from Symfony 6.3, prepare for Symfony 7 support.
    Open source →
  15. 2.16.1 23 May 2023
    Release notes
    • Add : void return to compiler passes to avoid warning from Symfony 6.3, and prepare for Symfony 7 support.
    Open source →
  16. 2.16.0 04 May 2023
    Release notes
    • Added support for AWS cloudfront, using the jean-beru/fos-http-cache-cloudfront package.
    Open source →
  17. 2.15.0 21 Feb 2023
    Release notes
    • Added Cloudflare proxy client.
    Open source →
  18. 2.14.0 01 Dec 2022
    Release notes
    • Fix handling of custom glue for response tags. If you use custom glue with the Symfony HttpCache, you can now configure a customized tag header parser on the PurgeTagsListener.
    Open source →
  19. 2.13.0 01 Sep 2022
    Release notes
    • Fix Symfony 6 deprecations on the command name configuration.
    Open source →
  20. 2.12.1 11 May 2022
    Release notes
    • Fix some PHP 8.1 deprecation warnings.
    Open source →
  21. 2.12.0 10 May 2022
    Release notes
    • Support Symfony 6
    • Drop support for Symfony 3 and 4.3 (keep using 2.11.* for legacy projects).
    Open source →
  22. 2.11.2 08 Nov 2021
    Release notes

    Fixed

    • Fixed servers_from_jsonenv to actually work with an array.
    Open source →
  23. 2.11.1 20 Sep 2021
    Release notes

    Fixed

    • Fixed readthedocs.io configuration. This needs a release to show up as the latest doc (which had no longer been updated in quite a while because of build errors)
    Open source →
  24. 2.11.0 15 Sep 2021
    Release notes

    Added

    • New configuration option servers_from_jsonenv to support a variable amount of proxy servers defined via an environment variable.
    Open source →
  25. 2.10.3 25 May 2021
    Release notes

    Fixed

    • Do not error in InvalidationListener nor TagListener when symfony/expression-language is missing but no expression is used.
    • Properly report missing symfony/expression-language when an expression is used in response configuration.
    Open source →
  26. 2.10.2 26 Jan 2021
    Release notes

    Fixed

    • The fix about overwriting flash messages on multiple redirects introduced in version 2.9.1 created the risk of losing flash messages when redirecting to a path that is outside the firewall or destroys the session. This version hopefully fixes both cases. Existing flash messages in a request cookie are merged with new flash messages from the session.
    Open source →
  27. 2.10.1 22 Dec 2020
    Release notes

    Fixed

    • Fix typehint in PHP 8 attributes handling to use ControllerResolverInterface
    Open source →
  28. 2.10.0 21 Dec 2020
    Release notes

    Changed

    • Adjusted to work with PHP 8
    • Dropped support for PHP 7.2
    • Added support for PHP 8 Attributes
    Open source →
  29. 2.9.2 26 Jan 2021
    Release notes

    Fixed

    • The fix about overwriting flash messages on multiple redirects introduced in version 2.9.1 created the risk of losing flash messages when redirecting to a path that is outside the firewall or destroys the session. This version hopefully fixes both cases. Existing flash messages in a request cookie are merged with new flash messages from the session.
    Open source →
  30. 2.9.1 27 Nov 2020
    Release notes

    Fixed

    • Flash messages won't be lost even when redirecting multiple times.
    Open source →
  31. 2.9.0 20 Aug 2020
    Release notes

    Added

    • New Feature: Command fos:httpcache:clear to clear the whole http cache.
    Open source →
  32. 2.8.0 28 Nov 2019
    Release notes

    Fixed

    • Adjusted to work with Twig 3
    • Adjusted to work with Symfony 5
    • Allow Httplug 2
    Open source →
  33. 2.7.2 16 Oct 2019
    Release notes

    Fixed

    • Avoid deprecation warning about ContainerAwareCommand.
    Open source →
  34. 2.7.1 08 Oct 2019
    Release notes

    Fixed

    • Avoid deprecation warning about TokenInterface::getRoles.
    • Improve exception message if a tag capable client is not found.
    Open source →
  35. 2.7.0 12 Jun 2019
    Release notes

    Changed

    • Allow to use environment variables to configure the caching proxy.

    Fixed

    • Invalidate the user context cache also when impersonating a user and when stopping to impersonate.
    Open source →
  36. 2.6.1 14 Dec 2018
    Release notes

    Fixed

    • Do not leak the Symfony-Session-NoAutoCacheControl header when the Symfony session system is not enabled.
    Open source →
  37. 2.6.0 23 Oct 2018
    Release notes

    Changed

    • User context lookup now tags the hash lookup response. The logout listener can now invalidate that tag instead of doing a BAN request. The previous varnish BAN request has been incorrect and banned all cache entries on Varnish. The logout handler is now also activated by default for the Symfony HttpCache in addition to Varnish and Noop.

    Fixed

    • Cache Tagging: It is now possible to use cache tagging without installing the SensioFrameworkExtraBundle. There is a new configuration option tags.annotations.enabled that can be set to false.
    Open source →
  38. 2.5.1 04 Oct 2018
    Release notes

    Fixed

    • Cache Tagging: Clear the SymfonyResponseTagger 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 →
  39. 2.5.0 01 Oct 2018
    Release notes

    Added

    • New Feature: Support for the max_header_value_length option to split huge tag lists into multiple headers. #483

    Fixed

    • Cache control on Symfony 4.1 now also works when the Vary header for user_context_hash is already present on the response. #485
    Open source →
  40. 2.4.1 09 Aug 2018
    Release notes
    • Adjust session_listener to work with Symfony 3.4.12 (https://github.com/symfony/symfony/pull/27467).
    Open source →
  41. 2.4.0 18 Jun 2018
    Release notes

    Added

    • Support for the Varnish xkey vmod for more efficient cache tagging.

    • Autoconfigure support for custom context providers.

    • Autowiring support for the services in this bundle:

      • fos_http_cache.cache_manager => FOS\HttpCacheBundle\CacheManager
      • fos_http_cache.http.symfony_response_tagger => FOS\HttpCacheBundle\Http\SymfonyResponseTagger
      • fos_http_cache.event_listener.cache_control => FOS\HttpCacheBundle\EventListener\CacheControlListener
      • fos_http_cache.proxy_client.default => FOS\HttpCache\ProxyClient\ProxyClient

      The old service names are still available, but using them directly is deprecated.

    Open source →
  42. 2.3.1 24 Apr 2018
    Release notes

    Fixed

    • Regression in the configuration when you explicitly specified the default proxy client. This started to be reported as error in 2.3.0 and now works again.
    Open source →
  43. 2.3.0 24 Apr 2018
    Release notes

    Added

    • [Symfony HttpCache] You can now configure the Symfony proxy client to directly call the HttpCache for invalidation requests instead of executing real web requests. Use the new configuration option proxy_client.symfony.use_kernel_dispatcher and follow the instructions in FOSHttpCache to adjust your kernel and bootstrap things accordingly.
    Open source →
  44. 2.2.2 20 Apr 2018
    Release notes

    Fixed

    • Fix session_listener decoration when session is not enabled.
    Open source →
  45. 2.2.1 16 Apr 2018
    Release notes

    Fixed

    • Adjust user context listener to handle Symfony 4.1 breaking behaviour change.
    Open source →
  46. 2.2.0 23 Mar 2018
    Release notes

    Support for Symfony 4. (Note that only the fos_http_cache.cache_manager service is public in Symfony 4. Use dependency injection if you need direct access to other services.)

    Added

    • You can now use cache tags and invalidate them with the Symfony HttpCache reverse proxy. You can tweak configuration in the proxy_client.symfony section of the configuration. See the FOSHttpCache documentation for instructions on how to set up the cache.

    • Allow to configure the purge method for the Symfony proxy client.

    • You can now also match requests with regular expressions on the query string. The new option match.query_string is available for cache control rules, tags and invalidation.

    • ETags can now be false, strong or weak by setting headers.etag option to "strong" or "weak" respectively. Value true due to backward compatibility will be resolved as "strong".

    Fixed

    • The FlashMessageListener has been broken during refactoring for 2.0 and now works again. Constructor uses an options array.

    • Tag annotations now work with SensioFrameworkExtraBundle 4. An accidental exception prevents using them with FOSHttpCacheBundle 2.0 and 2.1.

    • User context is more reliable not cache when the hash mismatches. (E.g. after login/logout.)

    • The ContextInvalidationLogoutHandler has been deprecated in favor of the ContextInvalidationSessionLogoutHandler. The original handler was called after the invalidation of the session, and thus did not invalidate the session it should have but a newly created one. You should remove the deprecated service fos_http_cache.user_context.logout_handler from the logout.handlers section of your firewall configuration.

    • User context compatibility which was broken due to Symfony making responses private if the session is started as of Symfony 3.4+.

    Deprecated

    • Setting up custom services with the commands provided in this bundle has been deprecated. The $commandName constructor argument will be removed in 3.0.
    Open source →
  47. 2.2.0-alpha1 09 Nov 2017 pre-release

    Nothing published for this version

  48. 2.1.2 12 Jan 2018

    Nothing published for this version

  49. 2.1.1 17 Jul 2017

    Nothing published for this version

  50. 2.1.0 23 Jun 2017
    Release notes

    Added

    • Individual rules in the cache_control can now again have a match_response or additional_response_status configuration to limit the rule to certain responses.

      For this, the signature of CacheControlListener::addRule had to be changed. It now expects a RuleMatcherInterface instead of the ResponseMatcherInterface. If you extended the listener or change the service configuration, this could be a BC BREAK for your application.

    Fixed

    • If no response matching is configured on cache_control, the global cacheable configuration is now respected to decide whether cache headers should be set. By default, this follows RFC 7234, only responses with status 200, 203, 204, 206, 300, 301, 404, 405, 410, 414 or 501 get cache headers.

      We decided to consider this a bugfix, but if your relied on this behaviour it will be a BC BREAK for your application.

    Open source →
  51. 2.0.0 10 Jun 2017
    Release notes

    General

    • Updated the version of FOSHttpCache to 2.0.0. See the FOSHttpCache changelog for more information. Most importantly, we removed the hard coupling on the Guzzle HTTP client (using HTTPlug). Your composer.json now needs to specify which HTTP client to install; see the installation instructions
    • Deprecated methods have been removed.

    Proxy client

    • The configuration for the proxy client has been adjusted. Proxy servers are now configured under http and servers must be a list - a comma separated string of server IPs is no longer supported.

    Event listeners

    • BC break: the UserContextListener constructor signature was changed to take an array of options.
    • BC break: renamed the event listener classes to XyzListener.

    Rule matcher

    • BC break: The match_response and additional_cacheable_status configuration parameters were removed for individual match rules. Note that match_response and additional_response_status have been re-added for cache_control in 2.0.1.

    • BC break: The second argument of the RuleMatcher constructor was changed to take a ResponseMatcherInterface.

    • Cacheable status codes are now configured globally (cacheable.response.additional_status or cacheable.response.expression).

    Tags

    • BC break: The TagHandler has been split. Invalidating tags happens through CacheManager::invalidateTags (if you use annotations for tag invalidation, you don't need to change anything). Recording tags and writing them into the responses is now done through the SymfonyResponseTagger. The service fos_http_cache.handler.tag_handler no longer exists. For tagging responses, use fos_http_cache.http.symfony_response_tagger instead, and to invalidate tags use the service fos_http_cache.cache_manager.
    • BC break: The configuration tags.header has been removed. Configuring the header for tagging responses is now done at tags.response_header. Configuring the header for tag invalidation requests is now done at proxy_client.varnish.tags_header.

    Tests

    • BC break: Dropped the proxy client services as they where not used anywhere. The services fos_http_cache.test.client.varnish and fos_http_cache.test.client.nginx no longer exist.

    User context

    • Added an option always_vary_on_context_hash to make it possible to disable automatically setting the vary headers for the user hash.
    Open source →
  52. 2.0.0-beta2 30 May 2017 pre-release

    Nothing published for this version

  53. 2.0.0-beta1 06 Mar 2017 pre-release

    Nothing published for this version

  54. 2.0.0-alpha1 06 Mar 2017 pre-release

    Nothing published for this version

  55. 1.3.16 29 Jun 2018
    Release notes
    • Adjust session_listener to work with Symfony 3.4.12 (https://github.com/symfony/symfony/pull/27467).
    Open source →
  56. 1.3.15 24 Apr 2018
    Release notes
    • Fix session_listener decoration when session is not enabled.
    Open source →
  57. 1.3.14 14 Apr 2018
    Release notes
    • User context compatibility which was broken due to Symfony making responses private if the session is started as of Symfony 3.4+.
    Open source →
  58. 1.3.13 23 Mar 2018
    Release notes
    • Symfony HttpCache User Context: Move the AnonymousRequestMatcher to FOSHttpCache.

      The recommended way to ignore cookie based sessions is to set session_name_prefix to false rather than omit the Cookie header from user_identifier_headers.

    Open source →
  59. 1.3.12 09 Nov 2017
    Release notes
    • Prevent potential accidental caching on user context hash mismatch (particularly with symfony HttpCache).
    Open source →
  60. 1.3.11 06 Nov 2017
    Release notes
    • #395 : Compatibility with SensioFrameworkExtraBundle 4.
    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