From a5337451d33be7895b0b71c5b42a881ea8ccfd93 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 25 Apr 2013 17:56:54 -0700 Subject: [PATCH] Remove negative cache with ldb. --- src/cpp/ripple/HashedObject.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/cpp/ripple/HashedObject.cpp b/src/cpp/ripple/HashedObject.cpp index 6550da39b8..d70cce3472 100644 --- a/src/cpp/ripple/HashedObject.cpp +++ b/src/cpp/ripple/HashedObject.cpp @@ -63,7 +63,6 @@ bool HashedObjectStore::store(HashedObjectType type, uint32 index, assert(false); } } - mNegativeCache.del(hash); return true; } @@ -77,19 +76,13 @@ HashedObject::pointer HashedObjectStore::retrieve(const uint256& hash) if (obj) return obj; - if (mNegativeCache.isPresent(hash)) - return obj; - if (!theApp || !theApp->getHashNodeDB()) return obj; std::string sData; leveldb::Status st = theApp->getHashNodeDB()->Get(leveldb::ReadOptions(), hash.GetHex(), &sData); if (!st.ok()) - { - mNegativeCache.add(hash); return obj; - } Serializer s(sData); @@ -139,7 +132,6 @@ bool HashedObjectStore::store(HashedObjectType type, uint32 index, } // else // cLog(lsTRACE) << "HOS: already had " << hash; - mNegativeCache.del(hash); return true; }