Bugfix: not updating if ttl is None

If ttl is none, the cache won't update.