C++ design: How to cache most recent used

前端 未结 10 1401
走了就别回头了
走了就别回头了 2021-02-09 12:21

We have a C++ application for which we try to improve performance. We identified that data retrieval takes a lot of time, and want to cache data. We can\'t store all data in mem

10条回答
  •  北海茫月
    2021-02-09 13:00

    As a simpler alternative, you could create a map that grows indefinitely and clears itself out every 10 minutes or so (adjust time for expected traffic).

    You could also log some very interesting stats this way.

提交回复
热议问题