Adam Heath wrote:
Adrian Crum wrote:

I wasn't suggesting using UtilCache - I was suggesting using a
ServiceEcaUtil implementation of a basic cache interface. When the
interface's cache clear method is called, the ServiceEcaUtil
implementation of the interface would clear the Map, then reload the ECAs.


Ah, yes, I understand that.

But you do not want a clear() call to automatically repopulate.  You
only repopulate when the item is needed again.  Otherwise, the original
clear call didn't really have any affect(ie, for reducing memory).

Good point.

Other classes could do the same thing in the cases where using UtilCache
would be dangerous or undesirable.


Well, if the 'cache' user can always recreate the values from the given
key, it's not really a problem; just additional load.

I was thinking it would be helpful from the Webtools perspective. There are so many things cached in memory that can't be cleared unless OFBiz is restarted. In my scenario, you could go to Webtools to clear the ECA cache.

Reply via email to