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:
parent
2dcff83be7
commit
6be59b53f1
6 changed files with 31 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue