U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Core » LRUCache has the GetLRU () method, but does not have GetLRUKey()
LRUCache has the GetLRU () method, but does not have GetLRUKey() [message #50443] Wed, 31 October 2018 11:08 Go to previous message
fermium is currently offline  fermium
Messages: 8
Registered: October 2018
Promising Member
In some situations, you need to know not only the value of the item to be removed from the cache, but also the key. The project I'm working on needs to get that key and do some work with it. I propose to add such functionality, like this:
template <class T, class K>
const K& LRUCacheKeyRet<T, K>::GetLRUKey()
{
	int tail = data[head].prev;
	return key[tail].key;
}
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: XmlParser::IsEnd() should be declared as const
Next Topic: Error in DUMP_ declaration
Goto Forum:
  


Current Time: Tue Apr 28 20:44:02 GMT+2 2026

Total time taken to generate the page: 0.00847 seconds