Unlike add() and replace(), this method always sets (or
overwrites) the value in memcache, regardless of previous
contents.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-11-14 UTC."],[[["The `set()` method in the `google.appengine.api.memcache` module sets or overwrites a key's value in the memcache, regardless of any previous contents."],["It takes parameters for the `key` (to be set), the `value` (which can be of any type and is pickled if complex), an optional `time` for expiration, an ignored `min_compress_len`, and an optional `namespace`."],["The `time` parameter allows setting an expiration time, either relative to the current time or as an absolute Unix epoch time, with items not expiring by default."],["The method returns `True` if the value was successfully set, and `False` in case of an error."]]],[]]