<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>I tried to test the NoCache CachePolicy with producer and consumer as follows:</p>
<p><br>
</p>
<p>1) At line <a href="https://github.com/named-data/ndn-cxx/blob/master/examples/producer.cpp#L68" class="OWAAutoLink" id="LPlnk168295" previewremoved="true"></a><a href="https://github.com/named-data/ndn-cxx/blob/a341ae80b555fb1a1c4b2738e5dddcfbbcdf77fc/examples/producer.cpp#L68" class="OWAAutoLink" id="LPlnk743405" previewremoved="true">https://github.com/named-data/ndn-cxx/blob/a341ae80b555fb1a1c4b2738e5dddcfbbcdf77fc/examples/producer.cpp#L68</a><br>
 I added:</p>
<p><br>
</p>
<p></p>
<div>ndn::lp::CachePolicy cachePolicy;</div>
<div>cachePolicy.setPolicy(ndn::lp::CachePolicyType::NO_CACHE);</div>
<div>data->setTag(std::make_shared<ndn::lp::CachePolicyTag>(cachePolicy));</div>
<div><br>
</div>
<div>Consumer example was used as it is (must be fresh is set to true).</div>
<div><br>
</div>
<div>Started NFD and ran the producer. Then ran the consumer on the same machine <span style="font-size: 12pt;">and got the data back.</span></div>
<div>Then I killed the producer and re-ran the consumer. I still got the data back.</div>
Only after the freshness period of data (10 seconds) did I stop receiving data from <span style="font-size: 12pt;">NFD and got a NoRoute Nack.</span>
<div>
<div><br>
</div>
<div>Is this not how NoCache policy is supposed to work? Am I doing something wrong?</div>
<div><br>
</div>
<div>Thanks</div>
<div>Ashlesh<br>
<p></p>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Nfd-dev <nfd-dev-bounces@lists.cs.ucla.edu> on behalf of Junxiao Shi <shijunxiao@email.arizona.edu><br>
<b>Sent:</b> Tuesday, February 14, 2017 6:21:53 AM<br>
<b>To:</b> Matteo Bertolino; nfd-dev@lists.cs.ucla.edu<br>
<b>Subject:</b> Re: [Nfd-dev] how to disable the ContentStore?</font>
<div> </div>
</div>
<div>
<div>Hi Matteo</div>
<div><br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I would like to disable the CS on a node.<br class="gmail_msg">
Should I write in the node.conf simply cs_max_packets 0 ?</blockquote>
<div>Yes.</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
how can a producer forbid a packet to be cached?<br class="gmail_msg">
Should I set the freshnessPeriod to 0?</blockquote>
<div>FreshnessPeriod=0 still allows the Data to be cached, but it cannot satisfy any Interest with MustBeFresh selector.</div>
<div>CachePolicy=NoCache in NDNLPv2 header (implemented as ndn::lp::CachePolicyTag in ndn-cxx) forbids local NFD to cache a Data, but other NFD can still cache it.</div>
<div><br>
</div>
<div>Yours, Junxiao</div>
</div>
</div>
</div>
</body>
</html>