Fixes #5782 forces lastcache to be an int