Make it possible to adjust cache_size dynamically. Not tested yet.