feat: add eternal cache entries

Those are entries that don't get stale over time, so we don't invalidate
them if they 'expire'.

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow
2022-08-21 13:04:48 -03:00
parent 2dcff83be7
commit 6be59b53f1
6 changed files with 31 additions and 11 deletions

View File

@ -42,7 +42,7 @@
namespace Net {
class MetaCacheSink : public FileSink {
public:
MetaCacheSink(MetaEntryPtr entry, ChecksumValidator* md5sum);
MetaCacheSink(MetaEntryPtr entry, ChecksumValidator* md5sum, bool is_eternal = false);
virtual ~MetaCacheSink() = default;
auto hasLocalData() -> bool override;
@ -54,5 +54,6 @@ class MetaCacheSink : public FileSink {
private:
MetaEntryPtr m_entry;
ChecksumValidator* m_md5Node;
bool m_is_eternal;
};
} // namespace Net