https://github.com/sourcepirate/pycache
A VeryFast in memory cache for Storing results of Already Computed Operations.
https://github.com/sourcepirate/pycache
Last synced: 18 days ago
JSON representation
A VeryFast in memory cache for Storing results of Already Computed Operations.
- Host: GitHub
- URL: https://github.com/sourcepirate/pycache
- Owner: sourcepirate
- Created: 2015-08-18T05:54:57.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-21T02:22:57.000Z (almost 11 years ago)
- Last Synced: 2025-08-24T17:31:31.383Z (10 months ago)
- Language: Python
- Size: 137 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
##PyCache
Pycache is a LRU Implemented with Linked Stack.
https://en.wikipedia.org/wiki/Cache_algorithms#LRU
[](https://travis-ci.org/plasmashadow/pycache)
###Installation:
```
git clone https://github.com/plasmashadow/pycache
cd pycache
python setup.py install
```
###Usage:
You can use pycache as both object as well as a decorator
```python
from pycache import cached
from pycache import Cache
cache = Cache()
@cached(cache)
def add(x,y):
return x+y
#operation will be computed and stored on cache
print add(2,3)
#will be retrived from cache
add(2,3)
# As a cache object
c = Cache()
c.insert(key, value)
c.update(key, value)
c.fetch(key)
```
###License
MIT