size_t size() const
Get the current number of entries.
Error init(size_t maxEntries=CS_DEFAULT_ENTRIES)
Initialize the Content Store.
size_t capacity() const
Get the maximum number of entries.
const Stats & stats() const
Get statistics.
Error insert(const Data &data, TimeMs now)
Insert Data into the cache.
const CsEntry * find(const Name &name, bool mustBeFresh=false, TimeMs now=0) const
Search the cache by Name.
void remove(const Name &name)
Remove the entry with the specified Name.
void evictStale(TimeMs now)
Remove stale entries.
bool isFresh(TimeMs now) const
Check if the Data is fresh.
const Data & data() const
Get the cached Data.
TimeMs staleTime() const
Get the freshness expiration timestamp.