Skip to content

Commit

Permalink
Update docs/advanced/controllers.md
Browse files Browse the repository at this point in the history
  • Loading branch information
karpetrosyan authored Nov 20, 2023
1 parent 4485df0 commit 254307b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/advanced/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ client = hishel.CacheClient(controller=controller)

`Hishel` is very conservative about what status codes are permitted
to be heuristically cacheable. When `allow_heuristics` is enabled,
`Hishel` will only cache responses having status codes 200, 301, and 308. In contrast, RFC 9111 specifies that many more responses can be heuristically cacheable, specifically 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, and 501. If you would prefer heuristic caching to the fullest extent permitted by
`Hishel` will only cache responses having status codes 200, 301, and 308. In contrast, RFC 9111 specifies that many more responses can be heuristically cacheable, specifically 200, 203, 204, 206, 300, 301, 308, 404, 405, 410, 414, and 501.

If you would prefer heuristic caching to the fullest extent permitted by
RFC 9111, then pass `HEURISTICALLY_CACHEABLE_STATUS_CODES` to `cacheable_status_codes`:

```python
Expand Down

0 comments on commit 254307b

Please sign in to comment.