cachier
cachier copied to clipboard
Persistent, stale-free, local and cross-machine caching for Python functions.
Pickling is about as slow as it can get, some benchmarks [here](https://www.benfrederickson.com/dont-pickle-your-data/). Any future plans for adding support for something faster, like [msgpack](https://github.com/msgpack/msgpack-python), or even json? I realize that some...
Decorated function gains a new attribute function, `is_from_cache`, which returns `True` if the result comes from the cache; otherwise `False`. For example, if the decorated function is named `foo()`: >>>...
See the [XDG Base directory specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) Sounds like `$XDG_CACHE_HOME/cachier` should be used if the `XDG_CACHE_HOME` environment variable is defined. By the way, this is a good first issue for any...
The ability to cache a method based on the function parameters to that method is extremely useful. However, at the moment, if I need to invalidate the cache for a...
Hi, I'd like to propose an enhancement similar to `verbose_cache`. I will call the new keyword argument `notify_fresh`. The wrapped function will return a tuple where the second value indicates...
@shaoyucheng used cachier directly in his business code, and found it was not working. He then set up some test code to verify, and it worked well as expected. He...
I cache a function which is called with large numpy arrays. There is an efficient way to hash them with https://github.com/ifduyue/python-xxhash I think it's a common use case, so I...
`class A: @cachier() def B(self): do something ` Rewrite the cache every time, instead of reading the cache, the expiration time is set immediately, I doubt whether it is because...
It could be useful to be able to dynamically change the cache directory. I have made some local changes to support this: https://github.com/signalityai/cachier/commit/9d896a03a817b20743d0d58369814d9219194edb Is this something you think is interesting...
redis is the king of cache, a backend for it can be cool (on my todo list, down on the bottom of it)