content server caches ObjectDbPtr

use Hash instead of Hash string

use constant instead of raw number

Change-Id: Ib3f5f2d4cd755bfb73b38c2621ad2383522b2621
diff --git a/src/content-server.h b/src/content-server.h
index c4b70c6..7d9b3ed 100644
--- a/src/content-server.h
+++ b/src/content-server.h
@@ -26,9 +26,10 @@
 #include "object-db.h"
 #include "action-log.h"
 #include <set>
+#include <map>
 #include <boost/thread/shared_mutex.hpp>
 #include <boost/thread/locks.hpp>
-#include "executor.h"
+#include "scheduler.h"
 
 class ContentServer
 {
@@ -61,6 +62,9 @@
   void
   serve_File_Execute(Ccnx::Name forwardingHint, Ccnx::Name locatorPrefix, Ccnx::Name interest);
 
+  void
+  flushStaleDbCache();
+
 private:
   Ccnx::CcnxWrapperPtr m_ccnx;
   ActionLogPtr m_actionLog;
@@ -73,7 +77,10 @@
   boost::filesystem::path m_dbFolder;
   int m_freshness;
 
-  Executor     m_executor;
+  SchedulerPtr     m_scheduler;
+  typedef std::map<Hash, ObjectDbPtr> DbCache;
+  DbCache m_dbCache;
+  Mutex m_dbCacheMutex;
 
   Ccnx::Name  m_deviceName;
   std::string m_sharedFolderName;