mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
JSON cache for account offers and account lines.
This commit is contained in:
@@ -176,6 +176,16 @@ public:
|
||||
int getFetchSize();
|
||||
void sweepFetchPack();
|
||||
|
||||
float getJSONHitRate() { return mJSONCache.getHitRate(); }
|
||||
int getJSONEntries() { return mJSONCache.getCount(); }
|
||||
|
||||
void storeJSONCache(int operation, const uint256& ledger, const uint160& object,
|
||||
const boost::shared_ptr<Json::Value>& data)
|
||||
{ mJSONCache.storeEntry(operation, ledger, object, data); }
|
||||
|
||||
boost::shared_ptr<Json::Value> getJSONCache(int operation, const uint256& ledger, const uint160& object)
|
||||
{ return mJSONCache.getEntry(operation, ledger, object); }
|
||||
|
||||
// network state machine
|
||||
void checkState(const boost::system::error_code& result);
|
||||
void switchLastClosedLedger(Ledger::pointer newLedger, bool duringConsensus); // Used for the "jump" case
|
||||
@@ -303,6 +313,8 @@ private:
|
||||
subMapType mSubTransactions; // all accepted transactions
|
||||
subMapType mSubRTTransactions; // all proposed and accepted transactions
|
||||
|
||||
JSONCache<UptimeTimerAdapter> mJSONCache;
|
||||
|
||||
TaggedCache< uint256, Blob , UptimeTimerAdapter > mFetchPack;
|
||||
uint32 mLastFetchPack;
|
||||
uint32 mFetchSeq;
|
||||
|
||||
Reference in New Issue
Block a user