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.
ARC - A Self-Tuning, Low Overhead Replacement Cache (2003)
Adaptive Replacement Cache on Wikipedia
lru_cache in cpython 3.4
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
arc_cache-0.1.1.tar.gz
(4.0 kB
view details)
Built Distribution
File details
Details for the file arc_cache-0.1.1.tar.gz
.
File metadata
- Download URL: arc_cache-0.1.1.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 703fce1df5bbfe47846a102fc1fbe12d73290f2cbc291383238980610c296cef |
|
MD5 | 6029c479ec9464aed4be05bb2095d209 |
|
BLAKE2b-256 | 59a0c0e531ac4bdc0b36d703b8892e4d2b4d9be9209dc287ecd692692bedb4e2 |
File details
Details for the file arc_cache-0.1.1.macosx-10.10-x86_64.tar.gz
.
File metadata
- Download URL: arc_cache-0.1.1.macosx-10.10-x86_64.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f42c398b71319b325d9a40bb626f0432c376e7a700e3664b5b711933b913c27c |
|
MD5 | d82c3e03303f07e239ca311ca580900c |
|
BLAKE2b-256 | b64d1a67db240e23a9d2989418471ae0b1078cdc5aacb8380ac82ae56f9e615f |
File details
Details for the file arc_cache-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: arc_cache-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf9c12faabcdb5bf89a8616f7a93d6a14f0be74c2ab4dfce797f0bcb269f835a |
|
MD5 | e811c1d1d7a1714862ad933ee24efa3d |
|
BLAKE2b-256 | 9042fe40266af657d2bea4800a313ccfb35d963f7dfec204353c71422921d15e |