Set `key` and `value` item in cache. When `read` is `True`, `value` should be a file-like object opened for reading in binary mode. Note: other diskcache arguments are ignored.
(self, key, value, read=False, **kwargs)
| 360 | return value |
| 361 | |
| 362 | def set(self, key, value, read=False, **kwargs): |
| 363 | """Set `key` and `value` item in cache. |
| 364 | |
| 365 | When `read` is `True`, `value` should be a file-like object opened |
| 366 | for reading in binary mode. |
| 367 | |
| 368 | Note: other diskcache arguments are ignored. |
| 369 | """ |
| 370 | if read: |
| 371 | value = value.read() |
| 372 | self[key] = value |
| 373 | return True |
no outgoing calls