diff --git a/daemon/fw/asf-measurements.cpp b/daemon/fw/asf-measurements.cpp
index 957e3a0..73b7cca 100644
--- a/daemon/fw/asf-measurements.cpp
+++ b/daemon/fw/asf-measurements.cpp
@@ -69,7 +69,7 @@
 void
 NamespaceInfo::extendFaceInfoLifetime(FaceInfo& info, FaceId faceId)
 {
-  info.m_measurementExpiration = getScheduler().schedule(AsfMeasurements::MEASUREMENTS_LIFETIME,
+  info.m_measurementExpiration = getScheduler().schedule(m_measurementLifetime,
                                                          [=] { m_fiMap.erase(faceId); });
 }
 
@@ -105,7 +105,7 @@
   // Set or update entry lifetime
   extendLifetime(*me);
 
-  NamespaceInfo* info = me->insertStrategyInfo<NamespaceInfo>(m_rttEstimatorOpts).first;
+  NamespaceInfo* info = me->insertStrategyInfo<NamespaceInfo>(m_rttEstimatorOpts, m_measurementsLifetime).first;
   BOOST_ASSERT(info != nullptr);
   return info;
 }
@@ -129,7 +129,7 @@
   // Set or update entry lifetime
   extendLifetime(*me);
 
-  NamespaceInfo* info = me->insertStrategyInfo<NamespaceInfo>(m_rttEstimatorOpts).first;
+  NamespaceInfo* info = me->insertStrategyInfo<NamespaceInfo>(m_rttEstimatorOpts, m_measurementsLifetime).first;
   BOOST_ASSERT(info != nullptr);
   return *info;
 }
@@ -137,7 +137,7 @@
 void
 AsfMeasurements::extendLifetime(measurements::Entry& me)
 {
-  m_measurements.extendLifetime(me, MEASUREMENTS_LIFETIME);
+  m_measurements.extendLifetime(me, m_measurementsLifetime);
 }
 
 } // namespace nfd::fw::asf
diff --git a/daemon/fw/asf-measurements.hpp b/daemon/fw/asf-measurements.hpp
index 75a3c2b..77925b6 100644
--- a/daemon/fw/asf-measurements.hpp
+++ b/daemon/fw/asf-measurements.hpp
@@ -132,8 +132,9 @@
   }
 
   explicit
-  NamespaceInfo(shared_ptr<const ndn::util::RttEstimator::Options> opts)
+  NamespaceInfo(shared_ptr<const ndn::util::RttEstimator::Options> opts, time::milliseconds measurementLifetime)
     : m_rttEstimatorOpts(std::move(opts))
+    , m_measurementLifetime(measurementLifetime)
   {
   }
 
@@ -173,6 +174,7 @@
 private:
   std::unordered_map<FaceId, FaceInfo> m_fiMap;
   shared_ptr<const ndn::util::RttEstimator::Options> m_rttEstimatorOpts;
+  time::milliseconds m_measurementLifetime;
   bool m_isProbingDue = false;
   bool m_isFirstProbeScheduled = false;
 };
@@ -201,14 +203,29 @@
   NamespaceInfo&
   getOrCreateNamespaceInfo(const fib::Entry& fibEntry, const Name& prefix);
 
+  void
+  setMeasurementsLifetime(time::milliseconds measurementsLifetime)
+  {
+    // Measurement lifetime should not expire as soon as it is configured
+    BOOST_ASSERT(measurementsLifetime > 0_ms);
+    m_measurementsLifetime = measurementsLifetime;
+  }
+
+  time::milliseconds
+  getMeasurementsLifetime() const
+  {
+    return m_measurementsLifetime;
+  }
+
 private:
   void
   extendLifetime(measurements::Entry& me);
 
 public:
-  static constexpr time::microseconds MEASUREMENTS_LIFETIME = 5_min;
+  static constexpr time::milliseconds DEFAULT_MEASUREMENTS_LIFETIME = 5_min;
 
 private:
+  time::milliseconds m_measurementsLifetime = DEFAULT_MEASUREMENTS_LIFETIME;
   MeasurementsAccessor& m_measurements;
   shared_ptr<const ndn::util::RttEstimator::Options> m_rttEstimatorOpts;
 };
diff --git a/daemon/fw/asf-probing-module.cpp b/daemon/fw/asf-probing-module.cpp
index a465a5b..27c493e 100644
--- a/daemon/fw/asf-probing-module.cpp
+++ b/daemon/fw/asf-probing-module.cpp
@@ -32,7 +32,7 @@
 
 namespace nfd::fw::asf {
 
-static_assert(ProbingModule::DEFAULT_PROBING_INTERVAL < AsfMeasurements::MEASUREMENTS_LIFETIME);
+static_assert(ProbingModule::DEFAULT_PROBING_INTERVAL < AsfMeasurements::DEFAULT_MEASUREMENTS_LIFETIME);
 
 ProbingModule::ProbingModule(AsfMeasurements& measurements)
   : m_probingInterval(DEFAULT_PROBING_INTERVAL)
diff --git a/daemon/fw/asf-strategy.cpp b/daemon/fw/asf-strategy.cpp
index edb6ec1..8688729 100644
--- a/daemon/fw/asf-strategy.cpp
+++ b/daemon/fw/asf-strategy.cpp
@@ -26,6 +26,7 @@
 #include "asf-strategy.hpp"
 #include "algorithm.hpp"
 #include "common/logger.hpp"
+#include <boost/lexical_cast.hpp>
 
 namespace nfd::fw::asf {
 
@@ -48,12 +49,21 @@
                                                                       m_probing.getProbingInterval().count());
   m_probing.setProbingInterval(time::milliseconds(probingInterval));
   m_nMaxTimeouts = params.getOrDefault<size_t>("max-timeouts", m_nMaxTimeouts);
+  auto measurementsLifetime = time::milliseconds(params.getOrDefault<time::milliseconds::rep>("measurements-lifetime",
+                                                                      AsfMeasurements::DEFAULT_MEASUREMENTS_LIFETIME.count()));
+  if (measurementsLifetime <= m_probing.getProbingInterval()) {
+    NDN_THROW(std::invalid_argument("Measurements lifetime (" + boost::lexical_cast<std::string>(measurementsLifetime) +
+                                    ") should be greater than the probing interval of " +
+                                    boost::lexical_cast<std::string>(m_probing.getProbingInterval())));
+  }
+  m_measurements.setMeasurementsLifetime(measurementsLifetime);
 
   this->setInstanceName(makeInstanceName(name, getStrategyName()));
 
   NDN_LOG_DEBUG(*m_retxSuppression);
   NFD_LOG_DEBUG("probing-interval=" << m_probing.getProbingInterval()
-                << " max-timeouts=" << m_nMaxTimeouts);
+                << " max-timeouts=" << m_nMaxTimeouts
+                << " measurements-lifetime=" << m_measurements.getMeasurementsLifetime());
 }
 
 const Name&
diff --git a/daemon/fw/asf-strategy.hpp b/daemon/fw/asf-strategy.hpp
index 83bff13..b41b4ab 100644
--- a/daemon/fw/asf-strategy.hpp
+++ b/daemon/fw/asf-strategy.hpp
@@ -85,9 +85,6 @@
   void
   sendNoRouteNack(Face& face, const shared_ptr<pit::Entry>& pitEntry);
 
-private:
-  AsfMeasurements m_measurements{getMeasurements()};
-
 NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   struct FaceStatsForwardingCompare
   {
@@ -96,6 +93,7 @@
   };
   using FaceStatsForwardingSet = std::set<FaceStats, FaceStatsForwardingCompare>;
 
+  AsfMeasurements m_measurements{getMeasurements()};
   std::unique_ptr<RetxSuppressionExponential> m_retxSuppression;
   ProbingModule m_probing{m_measurements};
   size_t m_nMaxTimeouts = 3;
