Patrick Antivackis wrote: > Hello, > I have some performance issue when I create a new record in > ProductCategoryMember and there are thousands of lines in the cache of this > entity. Looking at the code, I discovered that the GenericDelegator.create > is calling this.clearCacheLine(value); > > My question is why we need to clear the cache when we are inserting a new > value ?
Because some previous delegator call did a findByAnd, or some other call that returned a list. The condition used during that previous call may actually be able to include this *new* value that is being created. So, the previous list value needs to be cleared, so that when it is rerun, it'll have a chance to pull in the newly created value from the database.
