<div dir="ltr">Dear Steve,<div><br></div><div>Thanks for you reply,I think I misunderstood "Must be fresh" literally.</div><div>In my point of view,"Must be fresh" means ndn Interests  must get the newest data from publisher. Set a freshness period can help me to solve it.At first,I didn't find any way to set freshness value,but now I find it though you help.just using Data.<span style="font-size:0.9em;line-height:1em"> getMetaInfo() and set it.</span></div><div>MemoryContentCache is a good way to acheive it,I will try it.</div><div><br></div><div><br></div><div>Thanks for your help and reply, forgive my poor english spell.</div><div>qhsong</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-30 10:15 GMT+08:00 Steve DiBenedetto <span dir="ltr"><<a href="mailto:dibenede@cs.colostate.edu" target="_blank">dibenede@cs.colostate.edu</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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></div></div>_______________________________________________<br>
Ndn-interest mailing list<br>
<a href="mailto:Ndn-interest@lists.cs.ucla.edu" target="_blank">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" target="_blank">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>
</blockquote></div><br></div>