Yet Another Cache Implementation
Project description
Yet Another Cache Implementation
So you may be asking "Is there really a need for yet another cache implementation?" I mean we already have:
- functools.lru_cache (Python 3.2 or greater) - Decorator to wrap a function with a memoizing callable that saves up to the maxsize most recent calls.
- the memoize pattern
- pymemcache - A comprehensive, fast, pure-Python memcached client
- DiskCache - An Apache2 licensed disk and file backed cache library, written in pure-Python
- minicache - Python memory caching utilities for Python 2 and 3 versions, also PyPy.
- pylibmc - A Python wrapper around the libmemcached interface from TangentOrg.
- the memento pattern - a way of saving state
The answer is no, there are plenty of caching libraries and patterns out there and yet another one isn't necessary, so with that being said, here is Yet Another Caching Interface.
Motivation
I needed a caching interface that allowed me to change or implement
different storage backends as needed. I also wanted a caching implementation whose interface closely resembled the Python collections.MutableMapping
interface, so that I could easily switch between dictionaries and other storage backends.
Installing as a pip
To install the package run: pip install yaci
Developing Using Docker
The docker directory contains a Dockerfile that can be used to build a docker image which can be used for development. See the README.md in the docker directory for more help.
Using Pipenv
If you'd like to use Pipenv to mange this package in a development environment just run the command pipenv install
in the top level of the repository.
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 Distribution
Built Distribution
File details
Details for the file yaci-0.5.2.tar.gz
.
File metadata
- Download URL: yaci-0.5.2.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f622b52fb9a8556217c0287d4e81fa189008401910895b10d429205fdb0ffe66 |
|
MD5 | 01dc256016adcfc00b3b3296e9d8b60e |
|
BLAKE2b-256 | 7f88a95b3d6aadbf4891e835908188043e0614c2cb964187c48a2767c44c2676 |
File details
Details for the file yaci-0.5.2-py3-none-any.whl
.
File metadata
- Download URL: yaci-0.5.2-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7226f2146a07a3c0a2be7806033e148eff52e629c0daa5d26612d54ce8df7ba8 |
|
MD5 | c45fc21a0908227e2b68591df0c9c8eb |
|
BLAKE2b-256 | 7d161cbb7e11891fef9e9d0edcb4b60cc63c36526b3401c8c6cbcc02c1f67b32 |