<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; "><div>Hi Pan,</div><div><br></div><div>I'm not quite sure what your particular problem is.  Whenever "Lookup" is called before add on a container, it will just return that the item is not in the container and that's it.  There would never be call to the policy, and if you're getting it, then something is wrong with policy-container consistency.</div><div><br></div><div>Also, what do you mean by "modify ... how to insert"?  With LRU you always either add to the end or don't add, in which case you have to return false (otherwise you may get inconsistency and crashes).</div><div><br></div><div>---</div><div>Alex</div><br><div><div>On Jun 21, 2013, at 1:18 AM, <a href="mailto:panhgshine@163.com">panhgshine@163.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="line-height: 1.7; font-size: 14px; font-family: arial; ">Hi Alex,<div><br></div><div>I have modify a replacement policy based on LRU. I found that if lookup an item that did't insert the list, the program will break. And I read the API of boost::intrusive::list::splice(const_iterator p, list & x, const_iterator new_ele) function. It requires new_ele must point to an element contained in list x. So, I know the reason that program break. But, in real world, if the Lookup function in ContentStoreImpl execute before Add function in ContentStoreImpl, what would happen? And, can I modify the insert function in LRU policy to decide how to insert the item?</div><div><br></div><div>Thank you!</div><div>--Pan</div></div></blockquote></div></body></html>