Methods for a treatment of cached objects are described. In one embodiment, management of a region of a cache is configured with an eviction policy plug-in. The eviction policy plug-in includes an eviction timing component and a sorting component, with the eviction timing component including code to implement an eviction timing method, and the eviction timing method to trigger eviction of an object from the region of cache. The sorting component includes code to implement a sorting method to identify an object that is eligible for eviction from said region of cache. The sorting method includes identifying an object for eviction that is cached in the region of cache and that is larger than other objects that are cached in the region of cache.
Described herein are methods and apparatus, including computer program products, that implement cache eviction for runtime systems. A computer program product can cause a data processing apparatus to compute a fill level of a cache memory; use a first eviction process to evict one or more of the entities in the cache memory if the fill level exceeds a first threshold but not a second threshold; use a second, distinct eviction process to evict one or more of the entities in the cache memory if the fill level exceeds the second threshold but not a third threshold; and decline subsequent requests to store additional entities in the cache memory if the fill level exceeds the third threshold.