Skip to main content

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)`


Project details


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

sized_cacher-1.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

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

Hashes for sized_cacher-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a31546769543d72bcd06a82672fc77bf8e3d819b7d6eb9fb61d21e68ac6f12ec
MD5 97fb90db54e435777ec585e856131061
BLAKE2b-256 d03a9bbdbb6c2d19563f83990acdb9a260c1ac70d13192852a180033700f79fe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page