Thanks Gavin.
I understand. Unfortunately, I am in an environment where I need to band aid a poorly performing application in short order, hence the Saturday hours. I am trying different caching scenarios and was hoping that there was a single place to turn it on and off as I do my benchmarking.
And this is a good enough segway into another question.
Is there a short answer to why I would get stale data from the cache? The scenario is as follows:
Class A has a persistent collection of Class B. The collection is cached. I add a new Class B to an instance of Class A and persist Class B without persisting Class A(the association is established via a reference from Class B to Class A). I run a query to get all instances of Class A. The instance of Class A with the new instance of Class B does not reflect the new association.
I am assuming that this happens because the relationship from A to B was never persisted therefore the cache does not get notified of the change to A. But what if an instance of B was also referenced by a Class C(and A) and deleted by the instance of Class C, and hence is not reachable from A? Would it have to also be deleted from the collection contained in A?
I hope that all makes sense.
Also, is there a document or FAQ that give some details about the cache framework?
Thanks again,
Eugene
|