首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 我想你知道一个MRU缓存是什么,否则你不会读这个…

我想你知道一个MRU缓存是什么,否则你不会读这个…

资 源 简 介

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: HandleNonExistingKeyF

文 件 列 表

code.cpp
usage_example.cpp

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP