Pycortex is a very simple caching server. It can store string key/value pairs. Both the server and the client library are built using asyncio.
- Requests and responses are sent as JSON.
- Keys must be alphanumeric
- Values are utf-8.
- Set: {"m": "SET", "k": , "v": }
- Get: {"m": "GET", "k": }
- Evict: {"m": "EVICT", "k": }
- Clear: {"m": "CLEAR"}
- Cache hit (Get): {"v": , "e": False}
- Error (Get, Evict): {"v": None, "e": True}
- Ack (Set, Evict, Clear): {"v": None, "e": False}
- It is possible to set the maximum number of entries in the cache by setting the environment variable PYCORTEX_ENTRY_LIMIT to the desired limit.