MCPcopy
hub / github.com/django/django / set

Method set

django/core/cache/backends/base.py:156–161  ·  view source on GitHub ↗

Set a value in the cache. If timeout is given, use that timeout for the key; otherwise use the default cache timeout.

(self, key, value, timeout=DEFAULT_TIMEOUT, version=None)

Source from the content-addressed store, hash-verified

154 )
155
156 def set(self, key, value, timeout=DEFAULT_TIMEOUT, version=None):
157 """
158 Set a value in the cache. If timeout is given, use that timeout for the
159 key; otherwise use the default cache timeout.
160 """
161 raise NotImplementedError("subclasses of BaseCache must provide a set() method")
162
163 async def aset(self, key, value, timeout=DEFAULT_TIMEOUT, version=None):
164 return await sync_to_async(self.set, thread_sensitive=True)(

Callers 10

incrMethod · 0.95
set_manyMethod · 0.95
incr_versionMethod · 0.95
stopMethod · 0.45
request_processedMethod · 0.45
learn_cache_keyFunction · 0.45
process_responseMethod · 0.45
populateMethod · 0.45
renderMethod · 0.45
runMethod · 0.45

Calls

no outgoing calls

Tested by 1

runMethod · 0.36