Thestatcache module provides a simple optimization toos.stat(): remembering the values of previous invocations.
Thestatcache module defines the following functions:
The rest of the functions are used to clear the cache, or parts ofit.
stat(path), if any.stat(path) forpath startingwithprefix.stat(path) forpath a file in the directoryprefix, includingstat(prefix).Example:
>>> import os, statcache>>> statcache.stat('.')(16893, 2049, 772, 18, 1000, 1000, 2048, 929609777, 929609777, 929609777)>>> os.stat('.')(16893, 2049, 772, 18, 1000, 1000, 2048, 929609777, 929609777, 929609777)| Python Library Reference |