atmb4u / cashier Goto Github PK
View Code? Open in Web Editor NEWPersistent caching for python functions
Home Page: https://atmb4u.github.io/cashier
License: BSD 2-Clause "Simplified" License
Persistent caching for python functions
Home Page: https://atmb4u.github.io/cashier
License: BSD 2-Clause "Simplified" License
It would be nice to be able to specify the cache file locations (~/.cachier) - as this may not be the wanted location.
Would be great to be able to run a report that would show how many times each cache was hit, how many were hits or missed, and how long it took to complete the non-cached calls. This would help tune how cachier is configured.
What it says on the tin - are you just on a version of Python where lru_cache isn't available?
It can't import a threading module.
>>> @cache(cache_file="/tmp/cache.db")
... def fn(a=1):
... print(a)
... return a
...
>>>
>>> fn(a=1)
1
1
>>> fn(a=2)
1
>>>
https://github.com/atmb4u/cashier/blob/master/cashier/__init__.py#L130
Ability to utilize different backends for caching other than SQLite3 - like redis
Sorry if this is already supported, but it wasn't clear from the docs or the tests, if this library supports using the sqlite in memory operation mode to avoid unnecessary file system access if you don't need a persistent cache across process restarts.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.