Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Java library to cache files? [closed]

Is there are java library that will cache files to memory and disk? Basically, I would like the library to cache the file to memory. However, if the in memory cache gets larger than a certain threshhold, some of the files should be written to disk.

Is there any Java library that will do this?

Grae

Update:

Just a couple general comment.

I am only going to using these files once. They are just temp files. In a perfect world, I would keep them all in memory. However, I think I would run out of memory. What I guess I am really looking for is some sort of paging system. That can keep me form running out of memory, but also allow me to avoid writting everyhting to disk.

like image 883
GC_ Avatar asked Oct 10 '22 22:10

GC_


1 Answers

Sure, try Terracotta or EhCache. Or Google for "java cache" and pick something else.

like image 101
duffymo Avatar answered Oct 13 '22 12:10

duffymo