Skip to content

Commit 845973a

Browse files
feat: add docs
1 parent bf11727 commit 845973a

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ backends supporting Redis, Memcached, and Amazon DynamoDB.
1111

1212
## Features
1313

14-
- Supports `redis`, `memcache`, `dynamodb`, and `in-memory` backends.
14+
- Supports `redis`, `valkey`, `memcache`, `dynamodb`, and `in-memory` backends.
1515
- Easy integration with [FastAPI](https://fastapi.tiangolo.com/).
1616
- Support for HTTP cache headers like `ETag` and `Cache-Control`, as well as conditional `If-Match-None` requests.
1717

1818
## Requirements
1919

2020
- FastAPI
2121
- `redis` when using `RedisBackend`.
22+
- `valkey` when using `ValkeyBackend`.
2223
- `memcache` when using `MemcacheBackend`.
2324
- `aiobotocore` when using `DynamoBackend`.
2425

@@ -36,6 +37,12 @@ or
3637

3738
or
3839

40+
```shell
41+
> pip install "fastapi-cache2[valkey]"
42+
```
43+
44+
or
45+
3946
```shell
4047
> pip install "fastapi-cache2[memcache]"
4148
```
@@ -221,6 +228,11 @@ When using the Redis backend, please make sure you pass in a redis client that d
221228

222229
[redis-decode]: https://redis-py.readthedocs.io/en/latest/examples/connection_examples.html#by-default-Redis-return-binary-responses,-to-decode-them-use-decode_responses=True
223230

231+
### ValkeyBackend
232+
233+
When using the Valkey backend, please make sure you pass in a Valkey client that does not decode responses (`decode_responses` **must** be `False`). Cached data is stored as `bytes` (binary), decoding these in the Valkey client would break caching.
234+
235+
224236
## Tests and coverage
225237

226238
```shell

0 commit comments

Comments
 (0)