8000 Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD · symfony/symfony@cadd5cd · GitHub
[go: up one dir, main page]

Skip to content

Commit cadd5cd

Browse files
authored
Doc fix: clarify isMethodCacheable() returns true only for GET & HEAD
The current documentation points to https://tools.ietf.org/html/rfc7231#section-4.2.3. The spec says: "this specification defines GET, HEAD, and POST as cacheable, although the overwhelming majority of cache implementations only support GET and HEAD.". This fix to the documentation clarifies that Symfony follows majority (excluding POST) rather than the spec (including POST).
1 parent e4a7fd8 commit cadd5cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ public function isMethodSafe(/* $andCacheable = true */)
14711471
}
14721472

14731473
/**
1474-
* Checks whether the method is cacheable or not.
1474+
* Checks whether the method is cacheable or not. Returns true for GET and HEAD, false otherwise.
14751475
*
14761476
* @see https://tools.ietf.org/html/rfc7231#section-4.2.3
14771477
*

0 commit comments

Comments
 (0)
0