-
1. Re: CacheLoader
belaban Mar 16, 2004 8:45 PM (in response to klchan)// I presume the CacheLoader Interface is used for
// persisting the cache to either file or database.
// Correct me if I am wrong?
Yes.
// 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
// database.
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.
Bela -
2. Re: CacheLoader
klchan Mar 17, 2004 6:34 PM (in response to klchan)Thanks Bela for yr reponse.
Do u mean to say that u will have [1] the use cases or [2] the implementation ready by mid April?
If [2], then I would be glad to test and use it, else I may have to decide to find another solution.
thanks again. -
3. Re: CacheLoader
belaban Mar 17, 2004 11:02 PM (in response to klchan)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.
Bela