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


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)

Uploaded Source

arc_cache-0.1.1.macosx-10.10-x86_64.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

arc_cache-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

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

Hashes for arc_cache-0.1.1.tar.gz
Algorithm Hash digest
SHA256 703fce1df5bbfe47846a102fc1fbe12d73290f2cbc291383238980610c296cef
MD5 6029c479ec9464aed4be05bb2095d209
BLAKE2b-256 59a0c0e531ac4bdc0b36d703b8892e4d2b4d9be9209dc287ecd692692bedb4e2

See more details on using hashes here.

File details

Details for the file arc_cache-0.1.1.macosx-10.10-x86_64.tar.gz.

File metadata

File hashes

Hashes for arc_cache-0.1.1.macosx-10.10-x86_64.tar.gz
Algorithm Hash digest
SHA256 f42c398b71319b325d9a40bb626f0432c376e7a700e3664b5b711933b913c27c
MD5 d82c3e03303f07e239ca311ca580900c
BLAKE2b-256 b64d1a67db240e23a9d2989418471ae0b1078cdc5aacb8380ac82ae56f9e615f

See more details on using hashes here.

File details

Details for the file arc_cache-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for arc_cache-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf9c12faabcdb5bf89a8616f7a93d6a14f0be74c2ab4dfce797f0bcb269f835a
MD5 e811c1d1d7a1714862ad933ee24efa3d
BLAKE2b-256 9042fe40266af657d2bea4800a313ccfb35d963f7dfec204353c71422921d15e

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