Details
-
Bug
-
Status: Reopened
-
Resolution: Unresolved
-
1.7
-
None
-
Operating System: Windows XP
Platform: PC
URL: http://old.nabble.com/DO-NOT-REPLY--Bug-48634--New%3A-The-setSize-method-of-LRUCache-do-not-disabled-the-cache-td27352568.html
Description
I'm using JPEGTranscoder in a webapp.
I call the LRUCache.setsize at init of my webapp. It flushed the LRUCache.used list and set the LRUCache.maxsize variable to 0. The LRUCache.free list remains at 50 (which it initizialed by TileCache) which is in my opinion not logic.
The LRUCache.add method test the size of the LRUCache.free list to cache new item to the LRUCache.used list.
The LRUCache.used list grows up to 50. The LRUCache.setSize method is not able to flush the LRUCache.used list because there is if statement (inferior strict) on the maxsize (at 0) value against the new size (at 0).
If think a workaround would be to call LRUCache.setSized twice, the first with value > 50 and the second with 0