This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MidpointLruCache: | |
def __init__(self, size, oldpercentage): | |
self.size = size | |
self.oldsize = size * oldpercentage / 100 | |
self.youngsize = size * (100 - oldpercentage) / 100 | |
self.youngitems = collections.OrderedDict() | |
self.olditems = collections.OrderedDict() | |
def __call__(self, func): |