• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

According to the javadocs in Cache.getAllWithLoader(), CacheLoader.loadAll() should be invoked if the object is not found in the cache. This is a very desirable behaivor, since it allows bulk fetching of objects missing in the cache.

However, when actually invoking Cache.getAllWithLoader(), CacheLoader.load() is instead invoked for each cache miss.

Attached is a test-case. Sourceforge Ticket ID: 1831817 - Opened By: daniel_wiell - 14 Nov 2007 14:52 UTC

Comments

Sourceforge Tracker 2009-09-21

Logged In: YES user_id=693320 Originator: NO

Daniel

Yes I see your point.

It is a simple matter to accumulate the missing keys in a list and then do load them in a batch using asynchronousLoadAll(missingKeys, loaderArgument);

That way the loader implement can create a more efficient implementation.

I have changed the method.

The fix is in trunk and will be in ehcache-1.4-beta2.

Thanks Daniel.

Regards Greg Luck Comment by: gregluck - 28 Nov 2007 07:20 UTC

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira