Solved

Cache in Java

Posted on 2008-06-12
4
573 Views
Last Modified: 2013-11-24
Hi ,
I am working in a struts application.  I have a jsp with select button and  form fields like ename , empno, deptno etc.  my question is  I would like to store these values in a cache  when i click on select  and when i modify the values on the jsp the chache should be modified. can u explain me with a sample java program.

Thanks in Adv
0
Comment
Question by:samk4
4 Comments
 
LVL 23

Accepted Solution

by:
Ajay-Singh earned 250 total points
ID: 21775219
0
 
LVL 11

Assisted Solution

by:Manish
Manish earned 250 total points
ID: 21792393
I think in one class you can create static HashMap and use it as cache.
You have to more careful that value should get removed from cache otherwise it will become more big and you may get outofmemory exception on day.
http://www.javaworld.com/javaworld/jw-07-2001/jw-0720-cache.html?page=2
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now