tessl install tessl/pypi-pylibmc@1.6.0Quick and small memcached client for Python
Agent Success
Agent success rate when using this tile
86%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.04x
Baseline
Agent success rate without this tile
83%
A small cache wrapper that guarantees text and bytes keys behave as aliases of the same entry when talking to a memcached backend.
{"source": "text"} using key "café-token" and reading with b"caf\xc3\xa9-token" returns the stored value with no duplicate entry created @test"alpha" and b"brav\xc3\xb3", calling get_many([b"alpha", "bravó"]) returns both cached values keyed as b"alpha" and "bravó" without duplicating entries @testb"café-token" removes the value so that a follow-up read with "café-token" returns the supplied default @test@generates
class CacheBridge:
def __init__(self, servers: list[str] | tuple[str, ...], *, default_ttl: int = 0): ...
def set_value(self, key: str | bytes, value: object, ttl: int | None = None) -> bool: ...
def get_value(self, key: str | bytes, default: object | None = None) -> object | None: ...
def get_many(self, keys: list[str | bytes]) -> dict[str | bytes, object]: ...
def delete_value(self, key: str | bytes) -> bool: ...Memcached client with UTF-8 normalization between text and byte keys.