• New Feature
  • Status: Resolved
  • 2 Major
  • Resolution: Fixed
  • alexsnaps
  • Reporter: alexsnaps
  • February 10, 2012
  • 1
  • Watchers: 5
  • December 23, 2013
  • December 06, 2013


Since the introduction of ARC, some users of different frameworks, libraries and VM languages have requested ways to plug their own sizeOf implementation, ignored field and classes, … Currently, besides going through some obscure tricks, there is no public API for doing these things. If we don’t want to have to maintain all possible use cases out there, where users can’t annotate the fields or classes (or use cases where users can use tricks to calculate the size of cached entries efficiently), we probably want to open the current SizeOf API to the public and add an api to register your own sizeOf engine with Ehcache.


Alexander Snaps 2012-04-23

Some feedback from the forum: http://forums.terracotta.org/forums/posts/list/6940.page

Ryan Gardner 2012-10-03

The sizeOf calculator stuff should be easy to split out of ehcache-core into its own module that ehcache then depends upon.

The sizeOf calculator is useful for more than just cache operations - it’s also useful for getting answers to questions such as “how big is my session object right now?” etc.

Splitting it out of ehcache core and putting it into its own module would let it. The general-purpose agent-based sizeof would make sense to split out, I think and the less generic alternatives for when the agent doesn’t load successfully could remain in the core of ehcache.

Alexander Snaps 2013-09-03

I think this probably belongs to you now.

Alexander Snaps 2013-12-06

See the github project for further information: https://github.com/Terracotta-OSS/ehcache-sizeofengine

Kenny MacLeod 2013-12-22

What’s the fix version for this? 2.8.0?