python3-fscacher – caching results of operations on heavy file trees¶
- More information
- External resources
fscacher is a Python module which provides a cache and decorator for memoizing functions whose outputs depend upon the contents of a file argument.
If you have a function ‘foo()’ that takes a file path as its first argument, and if the behavior of ‘foo()’ is pure in the contents of the path and the values of its other arguments, ‘fscacher’ can help cache that function. It caches the outputs of ‘foo()’ will be cached for each set of input arguments and for a “fingerprint” (timestamps and size) of each ‘path’. If ‘foo()’ is called twice with the same set of arguments, the result from the first call will be reused for the second, unless the file pointed to by ‘path’ changes, in which case the function will be run again.
Distribution |
Base version |
Our version |
Architectures |
---|---|---|---|
Debian GNU/Linux 11.0 (bullseye) |
0.4.1-1~nd110+1 |
i386, amd64, sparc, armel, arm64 |
|
Debian GNU/Linux 12.0 (bookworm) |
0.4.1-1~nd120+1 |
i386, amd64, sparc, armel, arm64 |
|
Debian testing (trixie) |
0.4.3-0.1 |
||
Debian unstable (sid) |
0.4.3-0.2 |
0.4.1-1~nd+1 |
i386, amd64, sparc, armel, arm64 |
Ubuntu 22.04 “Jammy Jellyfish” (jammy) |
0.4.1-1~nd22.04+1 |
i386, amd64, sparc, armel, arm64 |