def METHOD_NAME(self, key: KT, value: VT, ttl: float) -> None:
    """Add/update an entry in the cache
    Args:
        key: key for this entry
        value: value for this entry
        ttl: TTL for this entry, in seconds
    """
    expiry = self._timer() + ttl
    self.expire()
    e = self._data.pop(key, SENTINEL)
    if e is not SENTINEL:
        assert isinstance(e, _CacheEntry)
        self._expiry_list.remove(e)
    entry = _CacheEntry(expiry_time=expiry, ttl=ttl, key=key, value=value)
    self._data[key] = entry
    self._expiry_list.add(entry)