예제 #1
0
class LRU:
    def __init__(self):
        #inits LRU cache, Server and Data Structure
        self.lru = LRUmap(maxsize=11, overflow=3, checktime=2)
    
    def get(self, key):
        #Exposed RPC to get data with a Key
        return self.lru.get(key)
    
    def put(self, key, value):
        #Exposed RPC to put data with a Key, Value pair
        self.lru.put(key, value)
예제 #2
0
 def __init__(self):
     #inits LRU cache, Server and Data Structure
     self.lru = LRUmap(maxsize=11, overflow=3, checktime=2)