Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ backends and the optional session transports ship as extras:
| Extra | Install | Pulls in | Needed for |
|-------|---------|----------|------------|
| `redis` | `uv add "fastapi-cachex[redis]"` | `redis[hiredis]`, `orjson` | `AsyncRedisCacheBackend` |
| `memcached` | `uv add "fastapi-cachex[memcached]"` | `pymemcache` | `MemcachedBackend` (the older `memcache` name still works until 0.4.0) |
| `memcached` | `uv add "fastapi-cachex[memcached]"` | `pymemcache` | `MemcachedBackend` |
| `jwt` | `uv add "fastapi-cachex[jwt]"` | `PyJWT` | `SessionConfig(token_format="jwt")` |

Extras combine: `uv add "fastapi-cachex[redis,jwt]"`.
Expand Down
5 changes: 5 additions & 0 deletions changelog.d/202.removed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**The deprecated `memcache` extra is removed; install `fastapi-cachex[memcached]`.**
The failure is quiet: pip and uv only warn about an unknown extra, so
`fastapi-cachex[memcache]` still installs, but without `pymemcache`, and
`MemcachedBackend` raises when it is constructed. Replace `[memcache]` with
`[memcached]` in your requirements.
7 changes: 4 additions & 3 deletions docs/BACKENDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,10 @@ after about 0.25 s. The costs:
## Memcached

Install the extra with `uv add "fastapi-cachex[memcached]"`. Before 0.3.8 it was
called `memcache`; that name still works but is deprecated and will be removed in
0.4.0. An unknown extra only produces a warning at install time, so after 0.4.0
`fastapi-cachex[memcache]` would install without `pymemcache`.
called `memcache`; 0.4.0 removed that name. An unknown extra only produces a
warning at install time, so `fastapi-cachex[memcache]` installs without
`pymemcache` and `MemcachedBackend` raises when it is constructed. See
[Migrating to 0.4.0](MIGRATING_0_4.md#memcache-extra).

```python
from fastapi_cachex.backends import MemcachedBackend
Expand Down
2 changes: 1 addition & 1 deletion i18n/zh-TW/docs/BACKENDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ BackendProxy.set(backend)

## Memcached {#memcached}

以 `uv add "fastapi-cachex[memcached]"` 安裝此 extra。0.3.8 以前這個 extra 名為 `memcache`;舊名稱仍可使用但已棄用,將於 0.4.0 移除。安裝時遇到不存在的 extra 只會顯示警告,因此 0.4.0 之後 `fastapi-cachex[memcache]` 會裝好套件但不含 `pymemcache`。
以 `uv add "fastapi-cachex[memcached]"` 安裝此 extra。0.3.8 以前這個 extra 名為 `memcache`,0.4.0 已移除這個名稱。安裝時遇到不存在的 extra 只會顯示警告,因此 `fastapi-cachex[memcache]` 會裝好套件但不含 `pymemcache`,建構 `MemcachedBackend` 時才會拋出錯誤。請參閱[遷移至 0.4.0](MIGRATING_0_4.md#memcache-extra)。

```python
from fastapi_cachex.backends import MemcachedBackend
Expand Down
2 changes: 1 addition & 1 deletion i18n/zh-TW/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ uv add fastapi-cachex
| Extra | 安裝 | 帶入套件 | 用途 |
|-------|------|---------|------|
| `redis` | `uv add "fastapi-cachex[redis]"` | `redis[hiredis]`、`orjson` | `AsyncRedisCacheBackend` |
| `memcached` | `uv add "fastapi-cachex[memcached]"` | `pymemcache` | `MemcachedBackend`(舊名稱 `memcache` 在 0.4.0 之前仍可使用) |
| `memcached` | `uv add "fastapi-cachex[memcached]"` | `pymemcache` | `MemcachedBackend` |
| `jwt` | `uv add "fastapi-cachex[jwt]"` | `PyJWT` | `SessionConfig(token_format="jwt")` |

Extra 可以組合:`uv add "fastapi-cachex[redis,jwt]"`。
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ docs = [

[project.optional-dependencies]
memcached = ["pymemcache>=4.0.0"]
# Deprecated alias of `memcached`, removed in 0.4.0 (#202).
memcache = ["pymemcache>=4.0.0"]
redis = ["redis[hiredis]>=5.3.0", "orjson>=3.4.7"]
jwt = ["PyJWT>=2.9.0"]

Expand Down
6 changes: 1 addition & 5 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading