EHC ❯ Custom SizeOfEngine is ignored
-
Bug
-
Status: Resolved
-
2 Major
-
Resolution: Duplicate
-
-
-
drb
-
Reporter: kmacleod
-
October 16, 2013
-
0
-
Watchers: 3
-
October 16, 2013
-
October 16, 2013
Description
{{CacheManager #createSizeOfEngine}} provides a means to use a custom {{SizeOfEngine}} implementation, falling back to {{DefaultSizeOfEngine}} if no custom implementation is specified. However, there are parts of EhCache that ignore this, and directly instantiate a {{DefaultSizePolicy}} regardless of the custom setting:
* {{LruMemoryStore #getSizeInBytes}} * {{MemoryStore #getInMemorySizeInBytes}}
The custom implementation should be used in all cases, and not just inside {{CacheManager}}.
Linking to duplicate issue for supporting user-defined SizeOf. However, there are no plans to change the Store methods mentioned. The fact that they rely on the DefaultSizeOfEngine is an implementation detail.