MCPcopy Create free account
hub / github.com/apache/trafficserver / RefCountCacheHeader

Class RefCountCacheHeader

src/iocore/hostdb/P_RefCountCache.h:364–374  ·  view source on GitHub ↗

The header for the cache, this is used to check if the serialized cache is compatible

Source from the content-addressed store, hash-verified

362
363// The header for the cache, this is used to check if the serialized cache is compatible
364class RefCountCacheHeader
365{
366public:
367 unsigned int magic = REFCOUNTCACHE_MAGIC_NUMBER;
368 ts::VersionNumber version{REFCOUNTCACHE_VERSION};
369 ts::VersionNumber object_version; // version passed in of whatever it is we are caching
370
371 RefCountCacheHeader(ts::VersionNumber object_version = ts::VersionNumber());
372 bool operator==(RefCountCacheHeader const &that) const;
373 bool compatible(RefCountCacheHeader *that) const;
374};
375
376// RefCountCache is a ref-counted key->value map to store classes that inherit from RefCountObj.
377// Once an item is `put` into the cache, the cache will maintain a Ptr<> to that object until erase

Callers 2

RefCountCacheMethod · 0.85

Calls 1

VersionNumberClass · 0.85

Tested by

no test coverage detected