cache size is a local variable now