limited the number of keys in cache file