ImageEngine/cortex — pull request #297 by johnhaddon (2014-06-27 15:21:39+00:00)
Title: Fixed LRUCache hangs.

This fixes a bug whereby the LRUCache could get stuck in limitCost(), never able to meet the maximum cost requirement because an item had been cached but not yet placed in the list.

The improved test cases both expose the hang (they never completed without this fix) and also perform better checking of the cost counting.