Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Implementing a Least-Recently-Used(LRU) Cache

In this section, you will learn about the least-recently- used(LRU) cache in Java.

Tutorial Details:

In this section, you can create a LRU(least-recently-used) Cache and manage it efficiently. Here the given program takes a in numeric input to fix the size of the LRU Cache. If your entry exceeds the size of the LRU Cache the the eldest element with key is removed. LRU Cache is implemented through the LinkedHashMap class.


 

Rate Tutorial:
http://www.roseindia.net/java/example/java/util/LRUCacheExample.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Implementing a Least-Recently-Used(LRU) Cache

View Tutorial:
Implementing a Least-Recently-Used(LRU) Cache

Related Tutorials:

Reloading Applets
Reloading Applets
 
Build your own caching mechanisms with volatile collections - JavaWorld June 1999
Build your own caching mechanisms with volatile collections - JavaWorld June 1999
 
Java Tip 83: Use filters to access resources in Java archives - JavaWorld
Java Tip 83: Use filters to access resources in Java archives - JavaWorld
 
Solve your servlet-based presentation problems - JavaWorld November 2000
Solve your servlet-based presentation problems - JavaWorld November 2000
 
Get smart with proxies and RMI - JavaWorld November 2000
Get smart with proxies and RMI - JavaWorld November 2000
 
Cache in on faster, more reliable JSPs - JavaWorld May 2001
Cache in on faster, more reliable JSPs - JavaWorld May 2001
 
The basics of Java class loaders
The basics of Java class loaders
 
Develop a generic caching service to improve performance - JavaWorld July 2001
Develop a generic caching service to improve performance - JavaWorld July 2001
 
I want my AOP!, Part 1
I want my AOP!, Part 1
 
Write once, persist anywhere
Write once, persist anywhere
 
Cache SOAP services on the client side
Cache SOAP services on the client side
 
Transparently cache XSL transformations with JAXP
Transparently cache XSL transformations with JAXP
 
Test email components in your software
Test email components in your software
 
Fixing the Java Memory Model, Part 2
Writing concurrent code is hard to begin with; the language should not make it any harder. While the Java platform included support for threading from the outset, including a cross-platform memory model that was intended to provide \"Write Once, Run Anywh
 
Fixing the Java Memory Model, Part 1
JSR 133, which has been active for nearly three years, has recently issued its public recommendation on what to do about the Java Memory Model (JMM).
 
JSyntaxColor 1.2.7
JSyntaxColor 1.2.7 JSyntaxColor is a library for coloring in real time user text input.
 
Servlet and JSP performance tuning
Servlet and JSP performance tuning This article describes performance-tuning techniques (PTT) for developing high performance and scalable JSP (JavaServer Pages) pages and servlets. That means building applications that are reasonably and consistently fa
 
ehcache
Overview Ehcache is a pure Java, in-process cache with the following features: Fast Simple Acts as a pluggable cache for Hibernate 2.1. Small foot print. Both in terms of size and memory requirements. Minimal dependencies. Fully documented. S
 
Commons Transaction
Commons Transaction aims at providing lightweight, standardized, well tested and efficient implementations of utility classes commonly used in transactional Java programming. Initially there are implementations for multi level locks,
 
Caching Dynamic Content with JSP 2.0
Server-side caching is a powerful and popular technique for improving the performance of server-side applications. After all, why compute twice what you can compute once and hang on to? Andrei Cioroianu shows you how to exploit this technique in JSP 2.0.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.