每当我的代码需要某种形式的数据缓存机制时,我总是倾向于“自己动手丰衣足食”这句俗语所说的那样做。
Whenever my code needed some sort of data-caching mechanism, I've tended to "roll my own," as the saying goes.
如果能够容忍数据稍微有些陈旧,那么使用定时的到期机制将可以极大地简化缓存策略。
Using a timed expiration technique, you can dramatically simplify your caching strategy, if you can afford to have data that is slightly stale.
它提供了在缓存器中存储数据、从缓存器中删除数据等方便机制。
It provides convenient mechanisms for storing data in the cache, getting data from the cache, removing data from the cache, and much more.
应用推荐