<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">you could add a new TLV field to the Data packet and increment it every time that this data packet is requested.</div><div class=""><br class=""></div><div class="">Then, you will have to modify the incoming data packet processing in the Forwarder class, so that the data packet is cached based on the value of this field. Your changes should be somewhere around here:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.5.0-30-g934f505-ndnSIM/daemon/fw/forwarder.cpp#L343-L351" class="">https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.5.0-30-g934f505-ndnSIM/daemon/fw/forwarder.cpp#L343-L351</a></div><div class=""><br class=""></div><div class="">Hope that this helps,</div><div class=""><br class=""></div><div class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Apr 28, 2017, at 8:28 AM, Ru Jia <<a href="mailto:rujia721@gmail.com" class="">rujia721@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hello,<div class=""><br class=""></div><div class="">If I want to record the number of times the data was requested and  determine whether the data is to be cached on the node based on this value. What's the best way to do this?</div><div class=""><br class=""></div><div class="">Thanks advanced for your response.</div><div class="">Ru Jia  </div></div><br class=""></div></blockquote></div><br class=""></div></body></html>