<div dir="ltr">Hi Ashlesh<div><br></div><div>Your producer code is correct.</div><div>It does not work due to <a href="https://redmine.named-data.net/issues/3966">NFD Bug 3966</a>. You may watch the issue on Redmine, and try again when it's resolved.</div><div><br></div><div>Yours, Junxiao<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 15, 2017 at 1:00 AM, Ashlesh Gawande (agawande) <span dir="ltr"><<a href="mailto:agawande@memphis.edu" target="_blank">agawande@memphis.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div id="m_-7484208628479726997divtagdefaultwrapper" 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>1) At line <a href="https://github.com/named-data/ndn-cxx/blob/master/examples/producer.cpp#L68" class="m_-7484208628479726997OWAAutoLink" id="m_-7484208628479726997LPlnk168295" target="_blank"></a><a href="https://github.com/named-data/ndn-cxx/blob/a341ae80b555fb1a1c4b2738e5dddcfbbcdf77fc/examples/producer.cpp#L68" class="m_-7484208628479726997OWAAutoLink" id="m_-7484208628479726997LPlnk743405" target="_blank">https://github.com/named-<wbr>data/ndn-cxx/blob/<wbr>a341ae80b555fb1a1c4b2738e5dddc<wbr>fbbcdf77fc/examples/producer.<wbr>cpp#L68</a><br>
I added:</p>
<p></p>
<div>ndn::lp::CachePolicy cachePolicy;</div>
<div>cachePolicy.setPolicy(ndn::lp:<wbr>:CachePolicyType::NO_CACHE);</div>
<div>data->setTag(std::make_shared<<wbr>ndn::lp::CachePolicyTag>(<wbr>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</div></div></div></div></blockquote></div></div></div></div>