4 Replies Latest reply on Jun 12, 2005 1:52 AM by Bela Ban

    Anyone using Jbosscache as write-back cache?

    gagan goel Newbie

      As far as I have read (I am new to Jbosscache :-)..), it seems that Jbosscache has been written with write-through policy in mind(i.e. on write, changes are also transfered to persistent store through cacheloader).

      The application that we are running has significantly large number of writes than reads, and one motivation for using cache was to reduce the number of database hits by preventing a write to database each time cache entry is modified.

      So a better solution in our case would be to use write-back policy. i.e. on writes, write only to the cache. And on eviction, data is saved back to database. But now the problem is that most recent data might not be available on database. So on read operation, if the node is not available in cache then the cacheloader should have some algorithm to check if some group member-server is holding the recent data, and if they do, then get the data from them. There are also some other non-trivial issues which arises in write-back policy.

      I was wondering if write-back policy is already implemented in jboss-cache which has skipped my attention, or if someone else has implented or tried to implent this.