mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 11:35:53 +00:00
Disable the JSON cache due to issue 99.
This commit is contained in:
@@ -1098,14 +1098,7 @@ Json::Value RPCHandler::doAccountLines (Json::Value params, LoadType* loadType,
|
||||
if (lpLedger->hasAccount (raAccount))
|
||||
{
|
||||
jvResult["account"] = raAccount.humanAccountID ();
|
||||
|
||||
boost::shared_ptr<Json::Value> jvsLines =
|
||||
theApp->getOPs ().getJSONCache (JSONCache::kindLines, lpLedger->getHash (), raAccount.getAccountID ());
|
||||
|
||||
if (!jvsLines)
|
||||
{
|
||||
jvsLines = boost::make_shared<Json::Value> (Json::arrayValue);
|
||||
Json::Value& jsonLines = *jvsLines;
|
||||
Json::Value& jsonLines = (jvResult["lines"] = Json::arrayValue);
|
||||
|
||||
AccountItems rippleLines (raAccount.getAccountID (), lpLedger, AccountItem::pointer (new RippleState ()));
|
||||
|
||||
@@ -1133,14 +1126,8 @@ Json::Value RPCHandler::doAccountLines (Json::Value params, LoadType* loadType,
|
||||
}
|
||||
}
|
||||
|
||||
theApp->getOPs ().storeJSONCache (JSONCache::kindLines, lpLedger->getHash (),
|
||||
raAccount.getAccountID (), jvsLines);
|
||||
}
|
||||
|
||||
if (!bUnlocked)
|
||||
MasterLockHolder.unlock ();
|
||||
|
||||
jvResult["lines"] = *jvsLines;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1208,21 +1195,12 @@ Json::Value RPCHandler::doAccountOffers (Json::Value params, LoadType* loadType,
|
||||
if (!lpLedger->hasAccount (raAccount))
|
||||
return rpcError (rpcACT_NOT_FOUND);
|
||||
|
||||
boost::shared_ptr<Json::Value> jvsOffers =
|
||||
theApp->getOPs ().getJSONCache (JSONCache::kindOffers, lpLedger->getHash (), raAccount.getAccountID ());
|
||||
|
||||
if (!jvsOffers)
|
||||
{
|
||||
jvsOffers = boost::make_shared<Json::Value> (Json::arrayValue);
|
||||
lpLedger->visitAccountItems (raAccount.getAccountID (), BIND_TYPE (&offerAdder, boost::ref (*jvsOffers), P_1));
|
||||
theApp->getOPs ().storeJSONCache (JSONCache::kindOffers, lpLedger->getHash (), raAccount.getAccountID (), jvsOffers);
|
||||
}
|
||||
Json::Value& jvsOffers = (jvResult["offers"] = Json::arrayValue);
|
||||
lpLedger->visitAccountItems (raAccount.getAccountID (), BIND_TYPE (&offerAdder, boost::ref (jvsOffers), P_1));
|
||||
|
||||
if (!bUnlocked)
|
||||
MasterLockHolder.unlock ();
|
||||
|
||||
jvResult["offers"] = *jvsOffers;
|
||||
|
||||
return jvResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user