diff --git a/daemon/table/cs-policy.cpp b/daemon/table/cs-policy.cpp
index 77101ac..4aab572 100644
--- a/daemon/table/cs-policy.cpp
+++ b/daemon/table/cs-policy.cpp
@@ -26,6 +26,8 @@
 #include "cs-policy.hpp"
 #include "cs.hpp"
 #include "core/logger.hpp"
+#include <boost/range/adaptor/map.hpp>
+#include <boost/range/algorithm/copy.hpp>
 
 NFD_LOG_INIT("CsPolicy");
 
@@ -40,13 +42,22 @@
 }
 
 unique_ptr<Policy>
-Policy::create(const std::string& key)
+Policy::create(const std::string& policyName)
 {
   Registry& registry = getRegistry();
-  auto i = registry.find(key);
+  auto i = registry.find(policyName);
   return i == registry.end() ? nullptr : i->second();
 }
 
+std::set<std::string>
+Policy::getPolicyNames()
+{
+  std::set<std::string> policyNames;
+  boost::copy(getRegistry() | boost::adaptors::map_keys,
+              std::inserter(policyNames, policyNames.end()));
+  return policyNames;
+}
+
 Policy::Policy(const std::string& policyName)
   : m_policyName(policyName)
 {
diff --git a/daemon/table/cs-policy.hpp b/daemon/table/cs-policy.hpp
index 2da1979..93e028e 100644
--- a/daemon/table/cs-policy.hpp
+++ b/daemon/table/cs-policy.hpp
@@ -41,18 +41,23 @@
 public: // registry
   template<typename P>
   static void
-  registerPolicy()
+  registerPolicy(const std::string& policyName = P::POLICY_NAME)
   {
-    const std::string& key = P::POLICY_NAME;
     Registry& registry = getRegistry();
-    BOOST_ASSERT(registry.count(key) == 0);
-    registry[key] = [] { return make_unique<P>(); };
+    BOOST_ASSERT(registry.count(policyName) == 0);
+    registry[policyName] = [] { return make_unique<P>(); };
   }
 
-  /** \return a Policy identified by \p key, or nullptr if \p key is unknown
+  /** \return a cs::Policy identified by \p policyName,
+   *          or nullptr if \p policyName is unknown
    */
   static unique_ptr<Policy>
-  create(const std::string& key);
+  create(const std::string& policyName);
+
+  /** \return a list of available policy names
+   */
+  static std::set<std::string>
+  getPolicyNames();
 
 public:
   explicit
@@ -173,7 +178,7 @@
 
 private: // registry
   typedef std::function<unique_ptr<Policy>()> CreateFunc;
-  typedef std::map<std::string, CreateFunc> Registry; // indexed by key
+  typedef std::map<std::string, CreateFunc> Registry; // indexed by policy name
 
   static Registry&
   getRegistry();
diff --git a/tests/daemon/table/cs-policy-lru.t.cpp b/tests/daemon/table/cs-policy-lru.t.cpp
index 71f1764..8813de5 100644
--- a/tests/daemon/table/cs-policy-lru.t.cpp
+++ b/tests/daemon/table/cs-policy-lru.t.cpp
@@ -38,6 +38,12 @@
 BOOST_AUTO_TEST_SUITE(Table)
 BOOST_AUTO_TEST_SUITE(TestCsLru)
 
+BOOST_AUTO_TEST_CASE(Registration)
+{
+  std::set<std::string> policyNames = Policy::getPolicyNames();
+  BOOST_CHECK_EQUAL(policyNames.count("lru"), 1);
+}
+
 BOOST_FIXTURE_TEST_CASE(EvictOne, UnitTestTimeFixture)
 {
   Cs cs(3);
diff --git a/tests/daemon/table/cs-policy-priority-fifo.t.cpp b/tests/daemon/table/cs-policy-priority-fifo.t.cpp
index 01380ef..04a613f 100644
--- a/tests/daemon/table/cs-policy-priority-fifo.t.cpp
+++ b/tests/daemon/table/cs-policy-priority-fifo.t.cpp
@@ -38,6 +38,12 @@
 BOOST_AUTO_TEST_SUITE(Table)
 BOOST_AUTO_TEST_SUITE(TestCsPriorityFifo)
 
+BOOST_AUTO_TEST_CASE(Registration)
+{
+  std::set<std::string> policyNames = Policy::getPolicyNames();
+  BOOST_CHECK_EQUAL(policyNames.count("priority_fifo"), 1);
+}
+
 BOOST_FIXTURE_TEST_CASE(EvictOne, UnitTestTimeFixture)
 {
   Cs cs(3);
