Decorator to cache function return values based on time.
Project description
timecache
Decorator to cache function return values based on time.
Install
pip3 install ftimecache
Usage
from ftimecache import ftimecache
@ftimecache(weeks=1, days=2, hours=3, minutes=4, seconds=5, milliseconds=6, microseconds=7)
def your_function(*args, **kwargs):
# do something
# OR
from datetime import timedelta
@ftimecache(timedelta=timedelta(weeks=1, ...))
def your_function(*args, **kwargs):
# do something
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
ftimecache-0.0.2.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for ftimecache-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ca9c671d3df46a445c9c8618c439d4843f58d7c7140713a0a0784f834fe9fa8 |
|
MD5 | b6a8b2abc42aa20c086bef95c80697d1 |
|
BLAKE2b-256 | 1c27336f3a49f5e1e6d801755e52fc574941ebd4f776de06daac4df7a87f0716 |