ResponseCacheStrategyInterface.php 1001B

1234567891011121314151617181920212223242526272829303132333435363738
  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. * ResponseCacheStrategyInterface implementations know how to compute the
  18. * Response cache HTTP header based on the different response cache headers.
  19. *
  20. * @author Fabien Potencier <fabien@symfony.com>
  21. */
  22. interface ResponseCacheStrategyInterface
  23. {
  24. /**
  25. * Adds a Response.
  26. */
  27. public function add(Response $response);
  28. /**
  29. * Updates the Response HTTP headers based on the embedded Responses.
  30. */
  31. public function update(Response $response);
  32. }