EsiResponseCacheStrategyInterface.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * This code is partially based on the Rack-Cache library by Ryan Tomayko,
  8. * which is released under the MIT license.
  9. * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801)
  10. *
  11. * For the full copyright and license information, please view the LICENSE
  12. * file that was distributed with this source code.
  13. */
  14. namespace Symfony\Component\HttpKernel\HttpCache;
  15. use Symfony\Component\HttpFoundation\Response;
  16. /**
  17. * EsiResponseCacheStrategyInterface implementations know how to compute the
  18. * Response cache HTTP header based on the different ESI response cache headers.
  19. *
  20. * @author Fabien Potencier <fabien@symfony.com>
  21. */
  22. interface EsiResponseCacheStrategyInterface
  23. {
  24. /**
  25. * Adds a Response.
  26. *
  27. * @param Response $response
  28. */
  29. public function add(Response $response);
  30. /**
  31. * Updates the Response HTTP headers based on the embedded Responses.
  32. *
  33. * @param Response $response
  34. */
  35. public function update(Response $response);
  36. }