context: Add cache size management