Add support for caching snaps.
Many people have been asking that snapd has some minimal caching of snaps. This is about doing that.
Add support for caching snaps.
Many people have been asking that snapd has some minimal caching of snaps. This is about doing that.
Idea we quickly mentioned last week:
Sugested implementation based on the above ideas: https://github.com/snapcore/snapd/pull/4017
This looks cool and it’s absolutely sufficient as first implementation but I’d like to propose two later improvements:
N
parameter configurable (perhaps via coreconfig). Ideally it would not be a simple counter as that is hard to control but instead a amount of space we are willing to use (e.g. 1GB).What do you think?
@mvo Thank you! Just reviewed it. Minor items only.
@zyga-snapd It’s already being sorted by some meaningful criteria, I think? Size is irrelevant for this, though… we want the LRU item instead of keeping largest/smallest around forever.
well, kinda. When we get around to implementing Out-of-disk-space protection we’ll want to have a policy WRT how it interacts with this cache.
Indeed, but we’d still not order them according to the file size. We’d simply cut down further into the cache until it satisfies some criteria, or just disable it altogether.