fix the check to usecache. Bug #731