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
Close
Hashes for sized_cacher-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a31546769543d72bcd06a82672fc77bf8e3d819b7d6eb9fb61d21e68ac6f12ec |
|
MD5 | 97fb90db54e435777ec585e856131061 |
|
BLAKE2b-256 | d03a9bbdbb6c2d19563f83990acdb9a260c1ac70d13192852a180033700f79fe |