10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 from PyQt5.QtCore import QDateTime, QTimer |
12 from PyQt5.QtCore import QDateTime, QTimer |
13 |
13 |
14 |
14 |
15 # TODO: add timeout for cached entries |
|
16 class E5Cache(object): |
15 class E5Cache(object): |
17 """ |
16 """ |
18 Class implementing a LRU cache of a specific size. |
17 Class implementing a LRU cache of a specific size. |
19 |
18 |
20 If the maximum number of entries is exceeded, the least recently used item |
19 If the maximum number of entries is exceeded, the least recently used item |