File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EhCache and the fly likes Writing to File - And updating cache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Caching » EhCache
Bookmark "Writing to File - And updating cache" Watch "Writing to File - And updating cache" New topic
Author

Writing to File - And updating cache

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
Hi,

We have a requirement to write to the file only when the element is moved out of the cache. How can we do this?

And is cache.put( new Element( key, value)); a good way of updating cache


Kesava Krishna
Ranch Hand

Joined: Sep 03, 2012
Posts: 42
Try writing a listener, which will get called on eviction of any element from the cache memory.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Writing to File - And updating cache
 
Similar Threads
Do jnlp file updates itself
Read/Write file everytime ?
Writing to DB file
JNLP On-Demand download
Reading in db file