aspose file tools*
The moose likes Beginning Java and the fly likes Object Caching? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Object Caching?" Watch "Object Caching?" New topic
Author

Object Caching?

Pradeep Bhat
Greenhorn

Joined: Jan 12, 2008
Posts: 29
What does the line "Object is stored in cache" mean? Can we control caching of objects?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

It means an instance of an object has been put into some persistent store. This could be, at the simplest level, something as basic as a Collection.

Consider this class:

This just wraps a Collection as a singleton (so we know there is only one instance of the cache in a program that uses it). In this case the object has been cached "in memory".

There are a multitude of cache implementations for different scenarios (for more complex situations have a google for JCS, EHCache, JBossCache JCache etc. ). All are configurable. A typical cache will have methods to specify how long an object can live in a cache before it becomes stale, what to do once the cache becomes full, how to uniquely identify objects in the cache, how often to check the cache for stale objects and so on. They may also include levels of caching, perhaps an in meneory cache with a File based cache that older objects are moved to once the in memory cache becomes full.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object Caching?