[Nfd-dev] how to disable the ContentStore?

Klaus Schneider klaus at cs.arizona.EDU
Wed Feb 15 10:29:07 PST 2017


Hi Ashlesh,

Junxiao probably knows this better, but I can make a guess.

Since the cachePolicy is part of NDNLP, I can imagine that it doesn't 
work when the producer and targeted cache are on the same node (since 
there's no "link" in between).

Can you try to replicate the scenario with 3 nodes

C --- R --- P

and see if the content is cached at either R or C?

Best regards,
Klaus




On 02/15/2017 01:00 AM, Ashlesh Gawande (agawande) wrote:
> 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
>
>
> _______________________________________________
> Nfd-dev mailing list
> Nfd-dev at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
>


More information about the Nfd-dev mailing list