LRUStore class adds LRU eviction mechanics to any store. This is most useful for finite stores (like disk and memory, which is where we're using it now)
afero.Fs is a nice library for abstracting the filesystem. im using it in DiskStore. makes testing faster.
Tagging Beamer and Andrey because they might find this interesting. It's probably not the last time we'll need to cache something (esp blobs) so let's not reinvent the wheel when it comes to caching.
There are two main additions here:
LRUStore
class adds LRU eviction mechanics to any store. This is most useful for finite stores (like disk and memory, which is where we're using it now)afero.Fs
is a nice library for abstracting the filesystem. im using it inDiskStore
. makes testing faster.Tagging Beamer and Andrey because they might find this interesting. It's probably not the last time we'll need to cache something (esp blobs) so let's not reinvent the wheel when it comes to caching.