fixed cache size bug