Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - cache mru
Search - cache mru - List
I suppose you know what a MRU cache is, otherwise you wouldn t been reading this. This is an implementation of a very simple one using only STL. To implement a cache, derive a subclass from this template class. As an implementor, you d have to implement two methods: HandleNonExistingKeyFetch - to handle cache misses. In this method you access the real source of data behind the cache and return the value. HandleItemRelease - (optional) called when an item is removed from the cache. The cache class is a template of two types, a key and value (like hash map). The value type is the type of the resource and the key type is the type of the resource address. (this is how you fetch a resource)
Date : 2008-10-13 Size : 1.79kb User : haha

I suppose you know what a MRU cache is, otherwise you wouldn t been reading this. This is an implementation of a very simple one using only STL. To implement a cache, derive a subclass from this template class. As an implementor, you d have to implement two methods: HandleNonExistingKeyFetch - to handle cache misses. In this method you access the real source of data behind the cache and return the value. HandleItemRelease - (optional) called when an item is removed from the cache. The cache class is a template of two types, a key and value (like hash map). The value type is the type of the resource and the key type is the type of the resource address. (this is how you fetch a resource) -I suppose you know what a MRU cache is, otherwise you wouldn t been reading this.This is an implementation of a very simple one using only STL.To implement a cache, derive a subclass from this template class.As an implementor, you d have to implement two methods: HandleNonExistingKeyFetch- to handle cache misses. In this method you access the real source of data behind the cache and return the value. HandleItemRelease- (optional) called when an item is removed from the cache.The cache class is a template of two types, a key and value (like hash map). The value type is the type of the resource and the key type is the type of the resource address. (this is how you fetch a resource)
Date : 2025-07-13 Size : 1kb User :
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.