文件名称:cpp_mru_cache
介绍说明--下载内容来自于网络,使用问题请自行百度
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)
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)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
code.cpp
usage_example.cpp
usage_example.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.