<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 29, 2015 at 7:58 PM, ndn ndn <span dir="ltr"><<a href="mailto:ndn@sqh.me" target="_blank">ndn@sqh.me</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:14px">Hello everyone,</span><div style="font-size:14px">I'm using NDN-CCL to writing a NDN application. But I find a problem about data cache.</div><div style="font-size:14px">In NDN network ,all data can store in CS.But in my application,some content always changing in 5 seconds,so I think setting a freshnessSecond will help me solve this problem. </div><div style="font-size:14px">I try to setMustBefresh value,but it not works.The app also receive the cached value.</div><div style="font-size:14px">But in NDN-CCL,I didn't find any method to set this?how to set it?</div><div style="font-size:14px"><br></div><div style="font-size:14px">hope you give me some reply.</div><div style="font-size:14px"><br></div><div style="font-size:14px">thanks.</div></div>
<br>_______________________________________________<br>
Ndn-interest mailing list<br>
<a href="mailto:Ndn-interest@lists.cs.ucla.edu">Ndn-interest@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/ndn-interest</a><br>
<br></blockquote></div><br></div><div class="gmail_extra">Please correct me if I'm wrong, but it sounds like you're trying to ensure the retrieving application always gets the latest data.</div><div class="gmail_extra"><br></div><div class="gmail_extra">"Must be fresh" tells NDN nodes to to return Data that have not yet expired. Data with a freshness period of 5 seconds will satisfy a "must be fresh" Interests for 5 seconds. The timer is with respect to when the Data arrived at the node.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Depending on the details of your application, you can try a couple things:</div><div class="gmail_extra"><br></div><div class="gmail_extra">  1. Set a conservative freshness period (e.g. 1 second).  This will result in more Interests reaching the publisher, but mitigate stale Data retrieval.</div><div class="gmail_extra">  2. Minimize the freshness period (e.g. 0 ms) so that the content is effectively never fresh.</div><div class="gmail_extra"><br></div><div class="gmail_extra">You can combine either approach with the CCL's publisher cache: <a href="http://named-data.net/doc/ndn-ccl-api/memory-content-cache.html">http://named-data.net/doc/ndn-ccl-api/memory-content-cache.html</a> . Your application can insert Data packets into this application content cache and then query it as Interests arrive. Note, you may need to set the cleanup timer value to something big to prevent it from removing the technically stale Data packets. However, this should simplify the publisher's implementation and keeping your consumers up to date.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Hope that helps,</div><div class="gmail_extra">Steve</div><div class="gmail_extra"><br></div></div>