Cachey¶
Description:
- Caching based on computation time and storage space.
Resources:
- [GitHub] https://github.com/dask/cachey
Example 1¶
Create a simple cache
In [ ]:
Copied!
from cachey import Cache
c = Cache(1e9, 1) # 1 GB, cut off anything with cost 1 or less
c.put('x', 'some value', cost=3)
c.put('y', 'other value', cost=2)
c.get('x')
from cachey import Cache
c = Cache(1e9, 1) # 1 GB, cut off anything with cost 1 or less
c.put('x', 'some value', cost=3)
c.put('y', 'other value', cost=2)
c.get('x')