Hi Craig, > There should not be any reason for the application to know whether a data > cache has been set up or not.
StoreCache is a published/exposed API with methods that allow user to operate on L2 cache. Hence a user may find it counter-intuitive when s/he explicitly configures openjpa.DataCache=false but still gets a no-op StoreCache. This no-op StoreCache also causes the implementation (StoreCacheImpl) to check whether it has non-null real delegate or not for every method. > So if the openjpa.DataCache is set to "false", a data cache that doesn't > do anything is instantiated. The other choice would have been not to instantiate anything at all and return null. I am trying to find out what is the rationale of a no-op implementation versus a pure null. Is it to save the user from NPE or something else internal to OpenJPA? -- View this message in context: http://www.nabble.com/StoreCache-DataCache-is-not-null-even-when-DataCache-is-configured-to-be-inactive-tp17380291p17403110.html Sent from the OpenJPA Developers mailing list archive at Nabble.com.