Generic cache of objects

前端 未结 3 1281
日久生厌
日久生厌 2021-01-11 14:16

Does anyone know any implementation of a templated cache of objects?

  • You use a key to find object (the same as in std::map<>)
  • You specify a maximum
3条回答
  •  醉梦人生
    2021-01-11 14:34

    You can use the Boost.MultiIndex library. It is easy to implement a MRU cache.

提交回复
热议问题