<div dir="ltr"><div><div><div><div><div>Hi Spyridon,<br><br></div>Thanks for the quick help! I checked these, but what I'm still not sure about is:<br></div>Are the policies defined in the folder model/cs or rather utils/trie? For example the LRU policy seems to be in:<br><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/master/utils/trie/lru-policy.hpp">https://github.com/named-data-ndnSIM/ndnSIM/blob/master/utils/trie/lru-policy.hpp</a><br></div><br>I see that there are several files in model/cs, namely content-store-impl, content-store-no-cache, content-store-with-freshness, content-store-with-probability, content-store-with-stats and ndn-content-store. I actually looked into them, but I couldn't find documentation in them saying what they are actually doing or meant for. <br><br></div>In utils/trie I found lots of policies defined, but I haven't yet found out how the functionality works. I am a bit confused about some terms used there since I haven't worked with your immense codebase before. I found the following guide, but I couldn't find things mentioned in the Content Store section in the code, e.g. cs::insert or cs::find. <br><a href="http://named-data.net/wp-content/uploads/2015/05/ndn-0021-4-nfd-developer-guide.pdf">http://named-data.net/wp-content/uploads/2015/05/ndn-0021-4-nfd-developer-guide.pdf</a><br><br></div><div>Overall, what I'm trying to find out is: For an example like the following<br><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/a5587caa724bbe0db85c8511649faf9e06f97754/examples/ndn-tree-cs-tracers.cpp">https://github.com/named-data-ndnSIM/ndnSIM/blob/a5587caa724bbe0db85c8511649faf9e06f97754/examples/ndn-tree-cs-tracers.cpp</a><br></div><div>can I simply write my own policy in utils/trie like the above linked lru-policy and change the line<br><span class="pl-c1">SetOldContentStore</span>(<span class="pl-s"><span class="pl-pds">"</span>ns3::ndn::cs::Lru<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>MaxSize<span class="pl-pds">"</span></span>,
      
      
        
                                       <span class="pl-s"><span class="pl-pds">"</span>100<span class="pl-pds">"</span></span>); <span class="pl-c">// default ContentStore parameters<br></span></div><div><span class="pl-c">to</span><br><span class="pl-c1">SetOldContentStore</span>(<span class="pl-s"><span class="pl-pds">"</span>ns3::ndn::cs::MyPolicy<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>MaxSize<span class="pl-pds">"</span></span>,
      
      
        
                                       <span class="pl-s"><span class="pl-pds">"</span>100<span class="pl-pds">"</span></span>);<br></div><div>or am I missing something here? (And why is it "old" content store?)<br><br></div><div>Thanks,<br><br></div><div>Roman<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 17, 2015 at 4:27 PM Spyridon (Spyros) Mastorakis <<a href="mailto:mastorakis@cs.ucla.edu">mastorakis@cs.ucla.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Roman,<br>
<br>
the source code of the contest store implementation and the various replacement policies is in the folder “model/cs”:<br>
<br>
<a href="https://github.com/named-data-ndnSIM/ndnSIM/tree/master/model/cs" rel="noreferrer" target="_blank">https://github.com/named-data-ndnSIM/ndnSIM/tree/master/model/cs</a><br>
<br>
Please let me know if you need anything else.<br>
<br>
--<br>
Spyridon (Spyros) Mastorakis<br>
Personal Website: <a href="http://cs.ucla.edu/~mastorakis/" rel="noreferrer" target="_blank">http://cs.ucla.edu/~mastorakis/</a><br>
Internet Research Laboratory<br>
PhD Computer Science<br>
UCLA<br>
<br>
<br>
> On Sep 17, 2015, at 12:36 PM, Roman Lutz <<a href="mailto:romanlutz@cs.umass.edu" target="_blank">romanlutz@cs.umass.edu</a>> wrote:<br>
><br>
> Hi!<br>
><br>
> I'm trying to implement various caching policies and compare them through simulations. Is there a straightforward way to do so? I have checked for occurrences of caching policies like LRU and LFU in the codebase, but I am not really sure where exactly the implementations are. I have figured out that you call the cache content store (correct me if I'm wrong), but if you could point me to the right source file or package, that would be very helpful.<br>
><br>
> Thanks,<br>
><br>
> Roman<br>
<br>
</blockquote></div>