Fix IllegalArgumentsException caused by zero entry weight insertions to the cache

insertions to the cache