cache results of function call with expire and maxsize.
Project description
# Sized Cacher
Cache results of function call with expire and maxsize.
`pip3 install -U sized-cacher`
## Usage
```python
disk_cache = DiskCache("./caches", maxsize=3)
@disk_cache.caching
def fn(a):
return a
for i in range(10):
print(fn(i))
```
## API
* `self.save(value, *args, **kwargs)`
* `new_func = self.caching(func)`
Cache results of function call with expire and maxsize.
`pip3 install -U sized-cacher`
## Usage
```python
disk_cache = DiskCache("./caches", maxsize=3)
@disk_cache.caching
def fn(a):
return a
for i in range(10):
print(fn(i))
```
## API
* `self.save(value, *args, **kwargs)`
* `new_func = self.caching(func)`
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file sized_cacher-1.1-py3-none-any.whl
.
File metadata
- Download URL: sized_cacher-1.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a31546769543d72bcd06a82672fc77bf8e3d819b7d6eb9fb61d21e68ac6f12ec |
|
MD5 | 97fb90db54e435777ec585e856131061 |
|
BLAKE2b-256 | d03a9bbdbb6c2d19563f83990acdb9a260c1ac70d13192852a180033700f79fe |