Mercurial > hg > orthanc
diff Core/Cache/MemoryCache.cpp @ 288:40d3bf6cc8d9
logs
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 14 Dec 2012 11:22:04 +0100 |
parents | 4031f73fe0e4 |
children | 4d7469f72a0b |
line wrap: on
line diff
--- a/Core/Cache/MemoryCache.cpp Fri Dec 14 10:46:00 2012 +0100 +++ b/Core/Cache/MemoryCache.cpp Fri Dec 14 11:22:04 2012 +0100 @@ -32,6 +32,8 @@ #include "MemoryCache.h" +#include <glog/logging.h> + namespace Orthanc { MemoryCache::Page& MemoryCache::Load(const std::string& id) @@ -40,6 +42,7 @@ Page* p = NULL; if (index_.Contains(id, p)) { + VLOG(1) << "Reusing a cache page"; assert(p != NULL); index_.TagAsMostRecent(id); return *p; @@ -49,6 +52,7 @@ // is full. if (index_.GetSize() == cacheSize_) { + VLOG(1) << "Dropping the oldest cache page"; index_.RemoveOldest(p); delete p; } @@ -59,6 +63,7 @@ result->content_.reset(provider_.Provide(id)); // Add the newly create page to the cache + VLOG(1) << "Registering new data in a cache page"; p = result.release(); index_.Add(id, p); return *p;