diff --git a/daemon/table/pit-entry.cpp b/daemon/table/pit-entry.cpp
index 5839771..e089a09 100644
--- a/daemon/table/pit-entry.cpp
+++ b/daemon/table/pit-entry.cpp
@@ -129,10 +129,7 @@
 bool
 Entry::addNonce(uint32_t nonce)
 {
-  std::pair<std::set<uint32_t>::iterator, bool> insertResult =
-    m_nonces.insert(nonce);
-
-  return insertResult.second;
+  return m_nonceList.add(nonce);
 }
 
 InRecordCollection::iterator
@@ -173,7 +170,7 @@
   }
 
   it->update(interest);
-  m_nonces.insert(interest.getNonce());
+  m_nonceList.add(interest.getNonce());
   return it;
 }
 
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index fb89e27..420bb29 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -26,6 +26,7 @@
 #ifndef NFD_DAEMON_TABLE_PIT_ENTRY_HPP
 #define NFD_DAEMON_TABLE_PIT_ENTRY_HPP
 
+#include "pit-nonce-list.hpp"
 #include "pit-in-record.hpp"
 #include "pit-out-record.hpp"
 #include "core/scheduler.hpp"
@@ -155,7 +156,7 @@
   EventId m_stragglerTimer;
 
 private:
-  std::set<uint32_t> m_nonces;
+  pit::NonceList m_nonceList;
   shared_ptr<const Interest> m_interest;
   InRecordCollection m_inRecords;
   OutRecordCollection m_outRecords;
diff --git a/daemon/table/pit-nonce-list.cpp b/daemon/table/pit-nonce-list.cpp
new file mode 100644
index 0000000..02502ab
--- /dev/null
+++ b/daemon/table/pit-nonce-list.cpp
@@ -0,0 +1,66 @@
+/* -*- 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,
+ *                      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.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * 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 "pit-nonce-list.hpp"
+
+namespace nfd {
+namespace pit {
+
+// The NonceList has limited capacity to avoid memory explosion
+// if PIT entry is constantly refreshed (NFD Bug #1770).
+// Current implementation keeps nonces in a set to detect duplicates,
+// and a queue to evict the oldest nonce when capacity limit is reached.
+// A limitation is that a nonce first appeared at time 0 and duplicated at time 10
+// could be evicted before a nonce appeared only once at time 5;
+// this limitation should not affect normal operation.
+
+const size_t NonceList::CAPACITY = 256;
+
+NonceList::NonceList()
+{
+}
+
+bool
+NonceList::add(uint32_t nonce)
+{
+  bool isNew = m_nonceSet.insert(nonce).second;
+  if (!isNew)
+    return false;
+
+  m_nonceQueue.push(nonce);
+  BOOST_ASSERT(m_nonceSet.size() == m_nonceQueue.size());
+
+  if (m_nonceSet.size() > CAPACITY) {
+    size_t nErased = m_nonceSet.erase(m_nonceQueue.front());
+    BOOST_ASSERT(nErased == 1);
+    m_nonceQueue.pop();
+    BOOST_ASSERT(m_nonceSet.size() == m_nonceQueue.size());
+    BOOST_ASSERT(m_nonceSet.size() <= CAPACITY);
+  }
+  return true;
+}
+
+} // namespace pit
+} // namespace nfd
diff --git a/daemon/table/pit-nonce-list.hpp b/daemon/table/pit-nonce-list.hpp
new file mode 100644
index 0000000..393ae34
--- /dev/null
+++ b/daemon/table/pit-nonce-list.hpp
@@ -0,0 +1,64 @@
+/* -*- 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,
+ *                      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.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * 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_PIT_NONCE_LIST_HPP
+#define NFD_DAEMON_TABLE_PIT_NONCE_LIST_HPP
+
+#include "common.hpp"
+
+namespace nfd {
+namespace pit {
+
+/** \brief represents a Nonce list
+ */
+class NonceList : noncopyable
+{
+public:
+  NonceList();
+
+  /** \brief records a nonce
+   *  \return true if nonce is new; false if nonce is seen before
+   */
+  bool
+  add(uint32_t nonce);
+
+  size_t
+  size() const
+  {
+    return m_nonceSet.size();
+  }
+
+public:
+  static const size_t CAPACITY;
+
+private:
+  std::set<uint32_t> m_nonceSet;
+  std::queue<uint32_t> m_nonceQueue;
+};
+
+} // namespace pit
+} // namespace nfd
+
+#endif // NFD_DAEMON_TABLE_PIT_NONCE_LIST_HPP
