Skip to content

Commit

Permalink
Mark http responses with status codes 300, 301, 302 and 410 c…
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinHoutevelts committed Oct 30, 2023
1 parent 091a793 commit 260452d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [1.2.1] - 2023-10-30
### Fixed
- Mark http responses with status codes `300`, `301`, `302` and `410` cacheable

## [1.2.0] - 2023-09-13
### Added
- Add Drupal 10 support. Drop Drupal 9 support.
Expand Down
4 changes: 4 additions & 0 deletions src/Service/Cache/Validation/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ class Validation implements EventSubscriberInterface
protected $cacheableStatusCodes = [
Response::HTTP_OK => true,
Response::HTTP_NON_AUTHORITATIVE_INFORMATION => true,
Response::HTTP_MULTIPLE_CHOICES => true,
Response::HTTP_MOVED_PERMANENTLY => true,
Response::HTTP_FOUND => true,
Response::HTTP_NOT_FOUND => true,
Response::HTTP_GONE => true,
];

protected $cacheableMethods = [
Expand Down

0 comments on commit 260452d

Please sign in to comment.