Update the key's expiry time using timeout. Return True if successful or False if the key does not exist.
(self, key, timeout=DEFAULT_TIMEOUT, version=None)
| 166 | ) |
| 167 | |
| 168 | def touch(self, key, timeout=DEFAULT_TIMEOUT, version=None): |
| 169 | """ |
| 170 | Update the key's expiry time using timeout. Return True if successful |
| 171 | or False if the key does not exist. |
| 172 | """ |
| 173 | raise NotImplementedError( |
| 174 | "subclasses of BaseCache must provide a touch() method" |
| 175 | ) |
| 176 | |
| 177 | async def atouch(self, key, timeout=DEFAULT_TIMEOUT, version=None): |
| 178 | return await sync_to_async(self.touch, thread_sensitive=True)( |
no outgoing calls