Jille / rufs

RUFS - share files with your friends
4 stars 0 forks source link

Readdir cache #2

Closed Jille closed 3 years ago

Jille commented 3 years ago

We should cache Readdir fanout calls.

We were thinking:

  1. Real Readdirs should always fan out, and use the cache if peers timed out (and the cache is somewhat recent)
  2. Open() and Stat() can always hit the cache

Be careful that a find(1) shouldn't eat all the memory.

sgielen commented 3 years ago
  1. Readdir: always fanout, remaining peers use the cache if it's not expired (> 30 sec old), remaining peers error/absent
  2. Open/Stat: use the cache if it's recent (< 10 sec old), remaining peers fanout, remaining peers error/absent