• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Writing to File - And updating cache

 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try writing a listener, which will get called on eviction of any element from the cache memory.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic