Store items in the order the keys were last recent updated. The last recent updated item was in end. The last furthest updated item was in front.
| 313 | |
| 314 | |
| 315 | class LRUDict(OrderedDict): |
| 316 | """ |
| 317 | Store items in the order the keys were last recent updated. |
| 318 | |
| 319 | The last recent updated item was in end. |
| 320 | The last furthest updated item was in front. |
| 321 | """ |
| 322 | |
| 323 | def __setitem__(self, key, value): |
| 324 | OrderedDict.__setitem__(self, key, value) |
| 325 | self.move_to_end(key) |
| 326 | |
| 327 | |
| 328 | _html_value_chars = set(string.ascii_letters + string.digits + '_-') |
no outgoing calls
no test coverage detected
searching dependent graphs…