Package to fast and easy cache
Project description
my Sweet Cache
This project let make fast and simply cache
autors
Bartłomiej Chwiłkowski (github: chwilko)
Structure
mySweetCache: mySweetCache.py: main functions utils.py: other function usefull to
Functions
cache: decorator to cache the result of the function use_par: decorator to set first function argument use_pars: decorator to set first function arguments
How to use
@cache("key")
def long_counting_function():
...
long_counting_function()
After first call this function result is saved in .MScache_files/key
In next call instead recount value will be read from cache.
To recount call long_counting_function(use_cache=False)
then cache will be overwrited
or delete .MScache_files/try file.
WARNING! If you define two function with the same key, there two functions will share the same cache file.
Licence
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mysweetcache-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71bfa5c19c58d96082a52f8c79e9f1ccc4438fbb3f9e22b7be85fffffaa16509 |
|
MD5 | 5ce6aef1bd8de03e5d7dca31adcd0b59 |
|
BLAKE2b-256 | 2cc3b804f5ceb4d2965a24fa3c11a89edab2213809c3e5e33f8af77ea9766c60 |