Automatically re-populate the cache at expiry time

前端 未结 4 1163
悲哀的现实
悲哀的现实 2021-02-09 14:52

I currently cache the result of a method invocation.

The caching code follows the standard pattern: it uses the item in the cache if it exists, otherwise it calculates t

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-09 15:30

    There doesn't seem to be any point in expiring an object just to immediately recreate it. Just turn off expiration; dtb shows how.

提交回复
热议问题