I can’t seem to find anything like it, neither as a Fuse fs. Is there really no file system, that just evicts the oldest entries once it’s full? I mean, it could be a simple stack.

This would have been the ideal tool for cache; no bothering with size limits and background daemons.

  • MajorasMaskForever@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 hours ago

    You probably can’t find it because you’re mixing mutually exclusive terminology.

    A stack is a First-In Last-Out data structure. If your entry criteria is time, the oldest files will persist and the newer ones will get purged first.

    If you want to remove oldest files first, you want a First In First Out queue.

    Both of these will permanently delete the original file.

    Caches are just a copy of real data, sitting somewhere that ideally has faster access times but smaller storage space. The real original file does not get modified. A cache will typically hold onto as much data as it can until it hits some cap, at which point a replacement algorithm is used to select which entry or entries to make space for the newly requested item. Very rarely will a cache delete entries on its own to minimize actively used space, but if they do they will likely just run the replacement algorithm without backfilling the space