~jeffpc/libjeffpc#32: 
Implement better generic file cache

Right now, the generic file cache code doesn't cache anything. This works, but it is suboptimal since the consumers always think that the underlying file has changed. We can do better than this.

Much like the event ports version, we can keep per-file stat info in memory. Then when it is time to answer whether or not a a file has changed, we can do a stat(2) and compare the result with the in-memory info.

We don't actually have to cache the file contents. Making file_cache_has_newer return a truthful value (based on stat(2)) will prevent a number of calls to file_cache_get by the consumers. That alone should be a win.

Status
REPORTED
Submitter
~jeffpc
Assigned to
No-one
Submitted
3 months ago
Updated
3 months ago
Labels
No labels applied.