MCPcopy
hub / github.com/django/django / _write_content

Method _write_content

django/core/cache/backends/filebased.py:43–46  ·  view source on GitHub ↗
(self, file, timeout, value)

Source from the content-addressed store, hash-verified

41 return default
42
43 def _write_content(self, file, timeout, value):
44 expiry = self.get_backend_timeout(timeout)
45 file.write(pickle.dumps(expiry, self.pickle_protocol))
46 file.write(zlib.compress(pickle.dumps(value, self.pickle_protocol)))
47
48 def set(self, key, value, timeout=DEFAULT_TIMEOUT, version=None):
49 self._createdir() # Cache dir can be deleted at any time.

Callers 2

setMethod · 0.95
touchMethod · 0.95

Calls 4

get_backend_timeoutMethod · 0.45
writeMethod · 0.45
dumpsMethod · 0.45
compressMethod · 0.45

Tested by

no test coverage detected