// I presume the CacheLoader Interface is used for
// persisting the cache to either file or database.
// Correct me if I am wrong?
// I like to know if there is any implementation of the
// CacheLoader right now? If not, when will there be
// an implementation or how should I implement/use it?
No, there is not yet an implementation. I'm still working on the use cases. You can look at the use case document, it is in cache/docs/design/CacheLoader.txt (CVS head).
I have the use case down for a shared cacheloader, but I want to go through use cases in which each node has its own local DB. This might change the interfaces slightly. I hope to be done by mid April.
The tasks that remain are
- flesh out the interface, see whether it covers all use cases
- Call the cacheloader at the right time from TreeCache
// I like to use it to re-populate the cache from
// database after a server restart. I have a cluster of
// 2 machines and each machine has its own local
You could do this using a client app, which reads from the DB and simply inserts. The CacheLoader will do a state transfer for the 2nd node and (optionally) lazily populate the cache.
Thanks Bela for yr reponse.
Do u mean to say that u will have  the use cases or  the implementation ready by mid April?
If , then I would be glad to test and use it, else I may have to decide to find another solution.
I should have the hooks in place by mid April. I might also provide a simple file-based implementation to see whether everything works.
We plane to provide a file-based impl, a DB impl, and maybe an impl based on Sleepycat's Java DB.