diff --git a/daemon/table/strategy-info-host.cpp b/daemon/table/strategy-info-host.cpp
index 9c46f1e..4961c68 100644
--- a/daemon/table/strategy-info-host.cpp
+++ b/daemon/table/strategy-info-host.cpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  Regents of the University of California,
- *                     Arizona Board of Regents,
- *                     Colorado State University,
- *                     University Pierre & Marie Curie, Sorbonne University,
- *                     Washington University in St. Louis,
- *                     Beijing Institute of Technology
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #include "strategy-info-host.hpp"
 
@@ -29,7 +30,7 @@
 void
 StrategyInfoHost::clearStrategyInfo()
 {
-  m_strategyInfo.reset();
+  m_items.clear();
 }
 
 } // namespace nfd
diff --git a/daemon/table/strategy-info-host.hpp b/daemon/table/strategy-info-host.hpp
index c7aa7da..1f6d940 100644
--- a/daemon/table/strategy-info-host.hpp
+++ b/daemon/table/strategy-info-host.hpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  Regents of the University of California,
- *                     Arizona Board of Regents,
- *                     Colorado State University,
- *                     University Pierre & Marie Curie, Sorbonne University,
- *                     Washington University in St. Louis,
- *                     Beijing Institute of Technology
+ * Copyright (c) 2014,  Regents of the University of California,
+ *                      Arizona Board of Regents,
+ *                      Colorado State University,
+ *                      University Pierre & Marie Curie, Sorbonne University,
+ *                      Washington University in St. Louis,
+ *                      Beijing Institute of Technology,
+ *                      The University of Memphis
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon).
  * See AUTHORS.md for complete list of NFD authors and contributors.
@@ -20,7 +21,7 @@
  *
  * You should have received a copy of the GNU General Public License along with
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
- **/
+ */
 
 #ifndef NFD_DAEMON_TABLE_STRATEGY_INFO_HOST_HPP
 #define NFD_DAEMON_TABLE_STRATEGY_INFO_HOST_HPP
@@ -29,72 +30,88 @@
 
 namespace nfd {
 
-/** \class StrategyInfoHost
- *  \brief base class for an entity onto which StrategyInfo may be placed
+/** \brief base class for an entity onto which StrategyInfo objects may be placed
  */
 class StrategyInfoHost
 {
 public:
-  template<typename T>
-  void
-  setStrategyInfo(shared_ptr<T> strategyInfo);
-
+  /** \brief get a StrategyInfo item
+   *  \tparam T type of StrategyInfo, must be a subclass of from nfd::fw::StrategyInfo
+   *  \retval nullptr if no StrategyInfo of type T is stored
+   */
   template<typename T>
   shared_ptr<T>
   getStrategyInfo() const;
 
+  /** \brief set a StrategyInfo item
+   *  \tparam T type of StrategyInfo, must be a subclass of from nfd::fw::StrategyInfo
+   */
   template<typename T>
-  shared_ptr<T>
-  getOrCreateStrategyInfo();
+  void
+  setStrategyInfo(shared_ptr<T> strategyInfo);
 
-  template<typename T, typename T1>
+  /** \brief get or create a StrategyInfo item
+   *  \tparam T type of StrategyInfo, must be a subclass of from nfd::fw::StrategyInfo
+   *
+   *  If no StrategyInfo of type T is stored, it's created with \p{args};
+   *  otherwise, the existing item is returned.
+   */
+  template<typename T, typename ...A>
   shared_ptr<T>
-  getOrCreateStrategyInfo(T1& a1);
+  getOrCreateStrategyInfo(A&&... args);
 
+  /** \brief clear all StrategyInfo items
+   */
   void
   clearStrategyInfo();
 
 private:
-  shared_ptr<fw::StrategyInfo> m_strategyInfo;
+  std::map<int, shared_ptr<fw::StrategyInfo>> m_items;
 };
 
 
 template<typename T>
-void
-StrategyInfoHost::setStrategyInfo(shared_ptr<T> strategyInfo)
-{
-  m_strategyInfo = strategyInfo;
-}
-
-template<typename T>
 shared_ptr<T>
 StrategyInfoHost::getStrategyInfo() const
 {
-  return static_pointer_cast<T, fw::StrategyInfo>(m_strategyInfo);
+  static_assert(std::is_base_of<fw::StrategyInfo, T>::value,
+                "T must inherit from StrategyInfo");
+
+  auto it = m_items.find(T::getTypeId());
+  if (it == m_items.end()) {
+    return nullptr;
+  }
+  return static_pointer_cast<T, fw::StrategyInfo>(it->second);
 }
 
 template<typename T>
-shared_ptr<T>
-StrategyInfoHost::getOrCreateStrategyInfo()
+void
+StrategyInfoHost::setStrategyInfo(shared_ptr<T> item)
 {
-  shared_ptr<T> info = this->getStrategyInfo<T>();
-  if (!static_cast<bool>(info)) {
-    info = make_shared<T>();
-    this->setStrategyInfo(info);
+  static_assert(std::is_base_of<fw::StrategyInfo, T>::value,
+                "T must inherit from StrategyInfo");
+
+  if (item == nullptr) {
+    m_items.erase(T::getTypeId());
   }
-  return info;
+  else {
+    m_items[T::getTypeId()] = item;
+  }
 }
 
-template<typename T, typename T1>
+template<typename T, typename ...A>
 shared_ptr<T>
-StrategyInfoHost::getOrCreateStrategyInfo(T1& a1)
+StrategyInfoHost::getOrCreateStrategyInfo(A&&... args)
 {
-  shared_ptr<T> info = this->getStrategyInfo<T>();
-  if (!static_cast<bool>(info)) {
-    info = make_shared<T>(ref(a1));
-    this->setStrategyInfo(info);
+  static_assert(std::is_base_of<fw::StrategyInfo, T>::value,
+                "T must inherit from StrategyInfo");
+
+  shared_ptr<T> item = this->getStrategyInfo<T>();
+  if (!static_cast<bool>(item)) {
+    item = make_shared<T>(std::forward<A>(args)...);
+    this->setStrategyInfo(item);
   }
-  return info;
+  return item;
 }
 
 } // namespace nfd
