Properly configuring cache