Removes all, or specified items from cache Use this after reading a large amount of large objects to free up memory, when you won't be needing the objects for a while.
(self, *items)
| 222 | return len(self.keys()) |
| 223 | |
| 224 | def uncache(self, *items): |
| 225 | """Removes all, or specified items from cache |
| 226 | |
| 227 | Use this after reading a large amount of large objects |
| 228 | to free up memory, when you won't be needing the objects |
| 229 | for a while. |
| 230 | |
| 231 | """ |
| 232 | if not items: |
| 233 | self.cache = {} |
| 234 | for it in items: |
| 235 | self.cache.pop(it, None) |
| 236 | |
| 237 | def waitget(self, key, maxwaittime=60): |
| 238 | """Wait (poll) for a key to get a value |