登录
首页 » Windows开发 » 我想你知道一个MRU缓存是什么,否则你不会读这个…

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

于 2022-11-30 发布 文件大小:1.79 kB
0 54
下载积分: 2 下载次数: 1

代码说明:

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

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696518资源总数
  • 104269会员总数
  • 31今日下载