Ei kuvausta

ResponseCacheStrategyInterface.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. * @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. }