Articles

What a cache!

Introduction

LRU (or Least Recently Used) is a cache eviction strategy, wherein if the cache size has reached the maximum allocated capacity, the least recently accessed objects in the cache will be evicted. Also, the objects in the cache could be accessed by multiple threads in an application so is very important that the cache has a good synchronization mechanism in-built. This article describes the implementation of a Java-based cache with LRU eviction strategy, but fundamentally, this applies to any programming language.

You may also like: Introducing Caching for Java Applications

Source de l’article sur DZONE