1#include <xrpl/basics/TaggedCache.ipp> 
    2#include <xrpl/ledger/CachedView.h> 
   10    return read(k) != 
nullptr;
 
 
   19    bool cacheHit = 
false;
 
   20    bool baseRead = 
false;
 
   25            auto const iter = 
map_.find(k.
key);
 
   26            if (iter != 
map_.end())
 
   43        "ripple::CachedView::read : null SLE result from base");
 
   44    if (cacheHit && baseRead)
 
   45        hitsexpired.increment();
 
   59    if (!sle || !k.
check(*sle))
 
 
Implementation for CountedObject.
 
virtual std::optional< digest_type > digest(key_type const &key) const =0
Return the digest associated with the key.
 
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
 
SharedPointerType fetch(key_type const &key)
 
std::optional< digest_type > digest(key_type const &key) const override
Return the digest associated with the key.
 
DigestAwareReadView const  & base_
 
std::shared_ptr< SLE const > read(Keylet const &k) const override
Return the state item associated with a key.
 
bool exists(Keylet const &k) const override
Determine if a state item exists.
 
std::unordered_map< key_type, uint256, hardened_hash<> > map_
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
A pair of SHAMap key and LedgerEntryType.
 
bool check(STLedgerEntry const &) const
Returns true if the SLE matches the type.