Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 is now generally available.


Replaces a key's value, failing if item isn't already in memcache.

key Key to set. See docs on Client for details.
value Value to set. Any type. If complex, will be pickled.
time Optional expiration time, either relative number of seconds from current time (up to 1 month), or an absolute Unix epoch time. By default, items never expire, though items may be evicted due to memory pressure. Float values will be rounded up to the nearest whole second.
min_compress_len Ignored option for compatibility.
namespace a string specifying an optional namespace to use in the request.

True if replaced. False on RPC error or cache miss.