Menu

#22 Cache configuration

open
nobody
None
5
2008-04-15
2008-04-15
Robert
No

Cache configuration is very hard by default, and the settings are hard to understand and provide.

Instead a much easier cache algorithm should be used. The proposed cache algorithm should be the following: The cache should include result sets temporalry, with strong reference, for a given period of (locality) time. This time should be a few seconds, maybe 30 or so. This time indicates that a given (high) number of cache hits must occur inside this given time. This is depending on locality mostly, so this should be a low number.

All objects which surpass this locality time period, the likelihood of getting a hit for them will get lower. But instead of throwing them out, we should leave them with a soft reference, and leave it to the garbage collector to handle low memory cases. This way we can harness the power of all the memory for the cost of higher garbage collection times.

The point is, that this "locality time" is very easy to measure, so it simplifies guessing the number, and enables the creation of an "intelligent cache" (see other feature request).

Discussion


Log in to post a comment.