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.1.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for ftimecache-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f7e11bf030992eaafc9e66e8a1b06d9bb724dcf21d74c103bdcd899dadba121 |
|
MD5 | f95ad2d803ccaf9b0c848418770438e0 |
|
BLAKE2b-256 | ddb5f8218c4cd93e77347f71e27e5160809178ac01b4ff3b2aeee0f530aba9cb |