<div dir="ltr">Dear Forks,<div>this is a piece of code for data pkt entry insertion in Cache Store(cs).which checks for insertion a new entry or not  .if it exists , then the entry will refresh  Stale Time of entry and if it is not, it will be inserted normally according to replacement policy .</div><div>Actually I need to extract  an ID for data packet that will be newly inserted or refreshed .How can I get to my goal??</div><div><div>bool isNewEntry = false;</div><div>  iterator it;</div><div> </div><div>  std::tie(it, isNewEntry) = m_table.insert(EntryImpl(data.shared_from_this(), isUnsolicited));</div><div>  EntryImpl& entry = const_cast<EntryImpl&>(*it);</div><div><br></div><div>  entry.updateStaleTime();</div><div><br></div><div>  if (!isNewEntry) { // existing entry</div><div>    // XXX This doesn't forbid unsolicited Data from refreshing a solicited entry.</div><div>    if (entry.isUnsolicited() && !isUnsolicited) {</div><div>      entry.unsetUnsolicited();</div><div>    }</div><div><br></div><div>    m_policy->afterRefresh(it);</div><div>  }</div><div>  else {</div><div>    m_policy->afterInsert(it);</div><div>  }</div></div></div>