Opened 8 months ago

Last modified 7 months ago

#129 assigned enhancement

Make cache more effective (supersedes #108)

Reported by: schwa Owned by: schwa
Priority: minor Milestone:
Component: Library Version: 3.4
Keywords: cache symlink Cc:

Description

Make cache more effective by storing and using more information.

As shown by #108, the current stat cache implementation isn't enough for some cases. To avoid repeated failing accesses to a cache entry which we already "know" isn't there, add more information to the cache:

  • Directories and files that aren't in the remote file system. As explained in #108, this can happen if a directory or file is a non-existent target of a symlink. But it can also happen if user code explicitly accesses non-existent file system entries.
  • Empty directories. If we can already know that a directory is empty, we don't need to list it again.
  • Similarly, we may even store the stat information (or a subset) for a directory under the directory cache entry somehow. The idea would be to avoid "re-listing" the directory.

Of course, in addition to storing this information, we must extend the code to use this new information to avoid remote accesses.

We must be careful to invalidate/delete all the affected cache information if a directory or file is changed or deleted.

Change History (1)

comment:1 Changed 7 months ago by schwa

Summary: Make cache more effectiveMake cache more effective (supersedes #108)
Note: See TracTickets for help on using tickets.