Looking for some caching guidelines / advice / patterns / etc.
I'm using EHCache with Hibernate and it works very well. In fact, I haven't had a single problem with it. I am using read-only caching for all of my immutable classes, query caching for my lookup/dropdown boxes, and I have turned on read-write caching for a few central classes.
I'm gradually turning on read-write caching on more and more classes, and now I'm wondering - what if I turned on read-write caching for everything? Aside from the warnings in the doc about transactions, is there any reason to be conservative with read-write caches, assuming that I can appopriately configure each cache's size/lifetime?
What if, going forward, as I map new entities, I cache them all by default, and then tweak my caching strategy later on if I encounter performance issues?
Also, I was wondering if anyone knew what sort of benefits I would get from "nonstrict read / write" cache? Does that just mean that it does not synchronize?
|