You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just ran into this library which is of interest, yet to try/explore more. But it resonated with me as potentially (?) to replace our home-brewed joblib based https://github.com/con/fscacher where the goal is to provide easy means to cache results of compute on files (think e.g. extraction of metadata or even checksums). Does exca provide such a facility (caching based on the state of the file)?
so the point here is that if path content changes (according to change in some fingerprint e.g. size, mtime, inode) - function is recomputed but if not -- result is cached/reused
At init, my snippet gets the hexdigest of the file and keep it as param in the class.
The exca infra uses the non-default param to compute the unique id, against which the infra is checked. If that unique id isn't already cached, then the method will be executed.
Activity
kingjr commentedon Jun 20, 2026
Thanks for the pointer. I didn't quite get what functionality you're looking for, would you have an example use case?
yarikoptic commentedon Jun 20, 2026
taking on the example in your README could be smth like
so the point here is that if
pathcontent changes (according to change in some fingerprint e.g. size, mtime, inode) - function is recomputed but if not -- result is cached/reusedkingjr commentedon Jun 21, 2026
I see. I think this should can covered with pydantic api:
The downside is that it'd check at the initialization, whereas exca usually check for cache at execution.
yarikoptic commentedon Jun 21, 2026
what in above would take care about invalidating the cache when file fingerprint (e.g. mtime or size) changes?
kingjr commentedon Jun 22, 2026
At init, my snippet gets the hexdigest of the file and keep it as param in the class.
The exca infra uses the non-default param to compute the unique id, against which the infra is checked. If that unique id isn't already cached, then the method will be executed.