Ctrl + k

or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pylibmc@1.6.x
tile.json

tessl/pypi-pylibmc

tessl install tessl/pypi-pylibmc@1.6.0

Quick 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%

task.mdevals/scenario-10/

UTF-8 Normalized Cache Bridge

A small cache wrapper that guarantees text and bytes keys behave as aliases of the same entry when talking to a memcached backend.

Capabilities

Unified single-key operations

  • Setting value {"source": "text"} using key "café-token" and reading with b"caf\xc3\xa9-token" returns the stored value with no duplicate entry created @test
  • Overwriting the same entry via the bytes form and reading via the text form returns the updated payload instead of the original @test

Bulk fetch normalization

  • After storing entries for keys "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 @test

Deletion coherence

  • Deleting an entry with b"café-token" removes the value so that a follow-up read with "café-token" returns the supplied default @test

Implementation

@generates

API

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: ...

Dependencies { .dependencies }

pylibmc { .dependency }

Memcached client with UTF-8 normalization between text and byte keys.