I'm trying to write a couple of caching algorithms but currently I'm stuck on an algorithm based on the size of an object in cache.
Based on the previous questions, I draw the conclusion that there is no good way to get the size of an object. So how is an algorithm based on object size supposed to work?