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.
Sure, try Terracotta or EhCache. Or Google for "java cache" and pick something else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With