Fetch a bunch of keys from the cache. For certain backends (memcached, pgsql) this can be *much* faster when fetching multiple values. Return a dict mapping each key in keys to its value. If the given key is missing, it will be missing from the response dict.
(self, keys, version=None)
| 192 | return await sync_to_async(self.delete, thread_sensitive=True)(key, version) |
| 193 | |
| 194 | def get_many(self, keys, version=None): |
| 195 | """ |
| 196 | Fetch a bunch of keys from the cache. For certain backends (memcached, |
| 197 | pgsql) this can be *much* faster when fetching multiple values. |
| 198 | |
| 199 | Return a dict mapping each key in keys to its value. If the given |
| 200 | key is missing, it will be missing from the response dict. |
| 201 | """ |
| 202 | d = {} |
| 203 | for k in keys: |
| 204 | val = self.get(k, self._missing_key, version=version) |
| 205 | if val is not self._missing_key: |
| 206 | d[k] = val |
| 207 | return d |
| 208 | |
| 209 | async def aget_many(self, keys, version=None): |
| 210 | """See get_many().""" |