Loading
Caching Techniques

Java Quick Notes

Refresh Your Java - Before Java Interview

We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....


Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet
Not Included Yet

Go to SiteMap

Q)  Java Caching Techniques


Ans)

Caching plays vital role in real time development, Caching is nothing but storing Static
or very rarely changed data in memory or on disk to avoid unnecessary delays for fetching
data from different sources.

This one of the very important Technique that people to use improve performance

of your application.

Here are some examples for caching .

i) User Data and Roles :
In most of the applications, every User is associated with a set of different roles based
on which they are allowed to perform certain tasks.This User-Role data will not be changed
very frequently so this could be loaded into-memory (Cached) upon sever start up.  Whenever
it is required to check if the User is authorized to perform certain task , we could get the
Role data from Cache instead of getting from DataBase, this could avoid unnecessary Trips
to DataBase and improves the Performance.

ii)  Product And Offer Data:
In same way in most of the Sales-Ordering systems , Productions and Offer Data would not be
changed very frequently , so SKU data and Pricing data etc, could be cached
for better performance .

Techniques:

Singleton classes:
Just create the Singleton classes and cache the static data by using Java Collection APIs
such as Hashmap or List .

Java Caching APIs:
Use the Caching APIs such as EHCache, JCache etc.,

HttpSession:
You could store the data in user Session.



Back to top

------------------------- We hope you got necessary Info On -----------------------------------------

Caching Techniques


Caching Techniques

-------------------------------------------------------------------------------------------------------



Face Book
Request for a Mock Interview/Training

Get a PDF

Face Book
Same look (Read) on any device, this is Ads free