google.appengine.api.memcache.replace
Stay organized with collections
Save and categorize content based on your preferences.
Replaces a key's value, failing if item isn't already in memcache.
google.appengine.api.memcache.replace(
key, value, time=0, min_compress_len=0, namespace=None
)
Args |
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.
|
Returns |
True if replaced. False on RPC error or cache miss.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[null,null,["Last updated 2025-06-16 UTC."],[],[]]