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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ftimecache-0.0.2.tar.gz.
File metadata
- Download URL: ftimecache-0.0.2.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e170849c9e59708f166b17c7e73ef14ad571f9525721da86fad0c225d0595731
|
|
| MD5 |
8e246a4f73bfbf834761ec18cc9b60ae
|
|
| BLAKE2b-256 |
d3437d25afe36f3fcfc5e57d43698b5139f3c2e8b0b9672c52dc673d48f0a05c
|
File details
Details for the file ftimecache-0.0.2-py3-none-any.whl.
File metadata
- Download URL: ftimecache-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ca9c671d3df46a445c9c8618c439d4843f58d7c7140713a0a0784f834fe9fa8
|
|
| MD5 |
b6a8b2abc42aa20c086bef95c80697d1
|
|
| BLAKE2b-256 |
1c27336f3a49f5e1e6d801755e52fc574941ebd4f776de06daac4df7a87f0716
|