Heya,
Im running into troubles with TreeCache and invalidate-on-update issue. For EHCache or OScache thats the behaviour I would expect, but why for TreeCache?
I start the transaction. Read an object. Modify it. Commit.
I get the object from cache while reading, but when commiting the cache is invalidated and I hit db. Okay, its normal behaviour some say, but I need to buffer the changes which take place 100/sec per cluster-node, and updates always come with prev reads. I cant do db-updates just like that. I need some buffering.
There;s an regular hibernate optimistic locking with versioning applied to that class. The TM is either HibTM or some JTA (JOTM).
I would like to see TreeCache update in-memory. In case of invalidate-on-update there's of course no place for eviction policies.
I realize that such approach is safe for multithread/cluster env, but still maybe there is a way to do that?
Any help will be appreciate.
Cheers
Mike
|