Merge pull request #23861 from chashmeetsingh/patch-1
Updated file documentation [ci skip]
This commit is contained in:
commit
3254dd0ffb
@ -523,7 +523,7 @@ end
|
||||
|
||||
### A note on weak ETags
|
||||
|
||||
Etags generated by Rails are weak by default. Weak etags allow symantically equivalent responses to have the same etags, even if their bodies do not match exactly. This is useful when we don't want the page regenerated for minor changes in response body. If you absolutely need to generate a strong etag, it can be assigned to the header directly.
|
||||
Etags generated by Rails are weak by default. Weak etags allow symantically equivalent responses to have the same etags, even if their bodies do not match exactly. This is useful when we don't want the page to be regenerated for minor changes in response body. If you absolutely need to generate a strong etag, it can be assigned to the header directly.
|
||||
|
||||
```ruby
|
||||
response.add_header "ETag", Digest::MD5.hexdigest(response.body)
|
||||
|
Loading…
Reference in New Issue
Block a user