mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
When an object is found in the epehermal DB, put it in the cache.
This commit is contained in:
@@ -192,8 +192,11 @@ HashedObject::pointer HashedObjectStore::retrieveLevelDB(const uint256& hash)
|
|||||||
{
|
{
|
||||||
obj = LLRetrieve(hash, theApp->getEphemeralLDB());
|
obj = LLRetrieve(hash, theApp->getEphemeralLDB());
|
||||||
if (obj)
|
if (obj)
|
||||||
|
{
|
||||||
|
mCache.canonicalize(hash, obj);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
LoadEvent::autoptr event(theApp->getJobQueue().getLoadEventAP(jtHO_READ, "HOS::retrieve"));
|
LoadEvent::autoptr event(theApp->getJobQueue().getLoadEventAP(jtHO_READ, "HOS::retrieve"));
|
||||||
@@ -365,8 +368,11 @@ HashedObject::pointer HashedObjectStore::retrieveSQLite(const uint256& hash)
|
|||||||
{
|
{
|
||||||
obj = LLRetrieve(hash, theApp->getEphemeralLDB());
|
obj = LLRetrieve(hash, theApp->getEphemeralLDB());
|
||||||
if (obj)
|
if (obj)
|
||||||
|
{
|
||||||
|
mCache.canonicalize(hash, obj);
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!theApp || !theApp->getHashNodeDB())
|
if (!theApp || !theApp->getHashNodeDB())
|
||||||
return obj;
|
return obj;
|
||||||
|
|||||||
Reference in New Issue
Block a user