[Nfd-dev] how to disable the ContentStore?

Ashlesh Gawande (agawande) agawande at memphis.edu
Wed Feb 15 00:00:14 PST 2017


I tried to test the NoCache CachePolicy with producer and consumer as follows:


1) At line <https://github.com/named-data/ndn-cxx/blob/master/examples/producer.cpp#L68> https://github.com/named-data/ndn-cxx/blob/a341ae80b555fb1a1c4b2738e5dddcfbbcdf77fc/examples/producer.cpp#L68
 I added:


ndn::lp::CachePolicy cachePolicy;
cachePolicy.setPolicy(ndn::lp::CachePolicyType::NO_CACHE);
data->setTag(std::make_shared<ndn::lp::CachePolicyTag>(cachePolicy));

Consumer example was used as it is (must be fresh is set to true).

Started NFD and ran the producer. Then ran the consumer on the same machine and got the data back.
Then I killed the producer and re-ran the consumer. I still got the data back.
Only after the freshness period of data (10 seconds) did I stop receiving data from NFD and got a NoRoute Nack.

Is this not how NoCache policy is supposed to work? Am I doing something wrong?

Thanks
Ashlesh

________________________________
From: Nfd-dev <nfd-dev-bounces at lists.cs.ucla.edu> on behalf of Junxiao Shi <shijunxiao at email.arizona.edu>
Sent: Tuesday, February 14, 2017 6:21:53 AM
To: Matteo Bertolino; nfd-dev at lists.cs.ucla.edu
Subject: Re: [Nfd-dev] how to disable the ContentStore?

Hi Matteo

I would like to disable the CS on a node.
Should I write in the node.conf simply cs_max_packets 0 ?
Yes.

how can a producer forbid a packet to be cached?
Should I set the freshnessPeriod to 0?
FreshnessPeriod=0 still allows the Data to be cached, but it cannot satisfy any Interest with MustBeFresh selector.
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.

Yours, Junxiao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20170215/aab4ae5f/attachment.html>


More information about the Nfd-dev mailing list