Skip to main content

Memoization decorator using an adaptive replacement cache.

Project description

Adaptive Replacement Cache - a Python3 decorator

Mostly for self-study purposes. Use at your own risk.

Usage

from arc_cache import arc_cache

@arc_cache()
def my_heavy_function(arg1):
  do_stuff()

Developing

Setup a virtualenv using

$ pip3 install tox
$ tox -e develop
$ . .venv/bin/activate

Testing

Run all tests using

$ tox

Releasing

$ python setup.py bdist sdist bdist_wheel
$ gpg -u ... --detach-sign -a dist/...
$ twine upload dist/*

References

Python 3.5 (I believe) uses a C-implementation of lru_cache.

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for arc_cache, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size arc_cache-0.1.1.macosx-10.10-x86_64.tar.gz (5.4 kB) File type Source Python version None Upload date Hashes View
Filename, size arc_cache-0.1.1-py3-none-any.whl (5.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size arc_cache-0.1.1.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page