<html><head><meta http-equiv="Content-Type" content="text/html charset=GB2312"><base href="x-msg://4936/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Aaron,<div><br></div><div>Policies defined in utils/trie/*-policy.h files are used by a special "policy-based" container defined in utils/trie/trie-with-policy.h.  The main storage for the container is defined in trie.h file, which implements a hash-based trie-like structure, resembling Patricia Trees, but with every level corresponds to the whole name component and children nodes organized using hash-container.</div><div><br></div><div>As you may see, both trie.h, trie-with-policy.h, and all policies are templated classes.  Particular instantiation of these classes happens in PIT/FIB/CS implementations.  For example, you can check content store implementation using trie-with-policy in  model/cs/content-store-impl.h (full definition of the content store) and  model/cs/content-store-impl.cc (instantiation of "known" content store types).</div><div><br></div><div>---</div><div>Alex</div><div><br><div><div>On Mar 30, 2013, at 10:55 PM, Aaron <<a href="mailto:aaronishere@qq.com">aaronishere@qq.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="line-height: 1.5; font-family: Î¢ÈíÑźÚ; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; margin: 10px; "><div>Hi, Alex</div><div> </div><div>I'm confused about the policy like LRU, LFU etc. under the file /utils/trie.  In the file such as LRU-policy.h, there are functions like insert, lookup, update, erase and so on. I'm not sure which functions/files, how and when call those funcitons in the lru/lfu/fifo/random policy.h?   </div><div> </div><hr align="left" size="1" style="width: 210px; height: 1px; "><div><span>Aaron</span></div></div></blockquote></div><br></div></body></html>