TODOs
This commit is contained in:
parent
6f1c39fd21
commit
bc33f69877
@ -48,7 +48,7 @@ void Cache::push(unique_ptr<Block> block) {
|
||||
void Cache::_popOldEntries() {
|
||||
lock_guard<mutex> lock(_mutex);
|
||||
while(_cachedBlocks.size() > 0 && _cachedBlocks.peek()->ageSeconds() > PURGE_LIFETIME_SEC) {
|
||||
_cachedBlocks.pop();
|
||||
_cachedBlocks.pop();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11,8 +11,7 @@
|
||||
namespace blockstore {
|
||||
namespace caching {
|
||||
|
||||
//TODO Test
|
||||
//TODO Move to utils
|
||||
// A class that is a queue and a map at the same time. We could also see it as an addressable queue.
|
||||
template<class Key, class Value>
|
||||
class QueueMap {
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user