sgns::crdt::GraphsyncDAGSyncer::LRUCIDCache
Public Functions
|
Name |
| void |
init(const CID & cid) |
| bool |
add(const CID & cid, std::shared_ptr< ipfs_lite::ipld::IPLDNode > node) |
| std::shared_ptr< ipfs_lite::ipld::IPLDNode > |
get(const CID & cid) |
| bool |
remove(const CID & cid) |
| bool |
contains(const CID & cid) const |
| bool |
hasContent(const CID & cid) const |
| size_t |
size() const |
Public Attributes
Public Functions Documentation
function init
void init(
const CID & cid
)
function add
bool add(
const CID & cid,
std::shared_ptr< ipfs_lite::ipld::IPLDNode > node
)
function get
std::shared_ptr< ipfs_lite::ipld::IPLDNode > get(
const CID & cid
)
function remove
bool remove(
const CID & cid
)
function contains
bool contains(
const CID & cid
) const
function hasContent
bool hasContent(
const CID & cid
) const
function size
inline size_t size() const
Public Attributes Documentation
variable MAX_CACHE_SIZE
static size_t MAX_CACHE_SIZE = 250;
variable cache_map_
std::map< CID, std::pair< std::shared_ptr< ipfs_lite::ipld::IPLDNode >, std::list< CID >::iterator > > cache_map_;
variable lru_list_
std::list< CID > lru_list_;
variable mutex_
Updated on 2026-04-13 at 23:22:46 -0700