Decouple memstore from retriever in cache package
The type memstore struct
is tightly coupled to a type Entry
and type Retriever
. We should find a way to decouple these dependecies since the memstore should not care about retrievers and only store entries.
The following discussion from !249 (merged) should be addressed:
-
@grzesiek started a discussion: (+7 comments) I don't think it is a good idea to keep a separate instance of retriever for every entry, and involve memstore into this logic. I just can't wrap my head around how this fits into preexisting data model and preexisting separation of concerns @jaime @nolith. I understand that we were fixing data race here, but how is the memstore related to retrieving data?!