Closed stevesimmons closed 3 days ago
Key must be hashable and as for the value everything goes (everything that is PyObject of course)
Type hints are here: https://github.com/deliro/moka-py/blob/master/moka_py/__init__.pyi#L5-L4
Hi! As @alwavshumilin said, key
must be Hashable
and value
can be arbitrary Python object. moka-py doesn't serialize or deserialize values, it stores their references instead.
Thank you for the question! I'll update docs to clarify this
Thanks for this project!
As the title asks, what types of objects can be cached? Does
moka
support any Python object? Or only ones that can be serialized/deserialized in some way?Could you please add something to the README explaining this?