[Interest] Qt based LRU container?
markg85 at gmail.com
Sat Oct 19 21:35:39 CEST 2013
On Sat, Oct 19, 2013 at 9:20 PM, Richard Moore <rich at kde.org> wrote:
> On 19 October 2013 18:43, Mark <markg85 at gmail.com> wrote:
>> Does anyone know of an LRU based container for Qt? I'm specifically
>> looking for an implementation that notifies me when something gets
>> removed due to LRU kicking in. QCache would be nearly OK for my needs,
>> but it doesn't notify me when something drops out due to LRU kicking
> If you need to know when something is evicted then it's not really
> acting as just a cache. That said, you could do it by making the
> object in the cache inform you in its destructor.
hmm, that could work. Never thought about using the destructor.
On the other hand, i would get into trouble when the object isn't only
in the cache but also in other places. Then a destruction signal might
not necessarily mean that it's removed from the cache.
Is there now "QLru" made in recent years? I mean, i can imagine the
need for an LRU to be quite high in some Qt areas so i'm quite
surprised that there doesn't seem to be any of it. Embedded comes to
More information about the Interest