Improve preparing cache