<div dir="ltr"><div dir="ltr"><div>Hi Marwa</div><div><br></div><div>In ccnd 0.x, Content Store is the nametree <span style="font-family:monospace">h->content_tree</span>.</div><div><br></div><div>This line attempts to insert an entry into the tree:</div><div>
<span style="font-family:monospace">ocookie = <span>ccny_enroll</span>(h-><span>content_tree</span>, y);

</span></div><div>After that, there are three conditions:</div><div>
    <span style="font-family:monospace"><span>if</span> (ocookie != <span>0</span>) {</span></div><div><span style="font-family:monospace">  // a ContentObject with the same name is already cached<br></span></div><div>
    <span style="font-family:monospace"><span>else</span> <span>if</span> (<span>ccny_cookie</span>(y) == <span>0</span>) {</span></div><div><span style="font-family:monospace">  // unable to insert<br></span></div><div>
    <span style="font-family:monospace"><span>else</span> { <br></span></div><div><span style="font-family:monospace">  // a new entry is inserted<br></span></div><div><span style="font-family:monospace">}<br></span></div><div><br></div><div>Cache eviction occurs in 
<span style="font-family:monospace"><span>content_tree_trim</span></span> function, invoked at the bottom of 
<span style="font-family:monospace"><span class="gmail-pl-en">process_incoming_content</span></span> function.<br></div><div><br></div><div>Yours, Junxiao<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 18, 2021 at 5:10 PM marwa kareem <<a href="mailto:m.kareem1305@coeng.uobaghdad.edu.iq" target="_blank">m.kareem1305@coeng.uobaghdad.edu.iq</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p style="text-align:center"><font color="red"><b>External Email</b><br></font></p><div dir="ltr">hello ndn-team<div><br></div><div>could you please guide me to where the caching is applied in this source code?</div><div>from here:  <a href="https://github.com/ProjectCCNx/ccnx/blob/5be2b715d0cc6bb4b7c6bb7459d311bddff46834/csrc/ccnd/ccnd.c#L4830" target="_blank">https://github.com/ProjectCCNx/ccnx/blob/5be2b715d0cc6bb4b7c6bb7459d311bddff46834/csrc/ccnd/ccnd.c#L4830</a><br></div><div><br></div><div>to here: </div><div><a href="https://github.com/ProjectCCNx/ccnx/blob/5be2b715d0cc6bb4b7c6bb7459d311bddff46834/csrc/ccnd/ccnd.c#L4968" target="_blank">https://github.com/ProjectCCNx/ccnx/blob/5be2b715d0cc6bb4b7c6bb7459d311bddff46834/csrc/ccnd/ccnd.c#L4968</a></div><div><br></div><div><br></div><div>thanks in advance.</div><div><br></div><div>Marwa</div></div><br>
</blockquote></div></div>