Beispiel #1
0
 def get_cache(cls, id):
     key = '{}_{}'.format(cls.__name__, id)
     cached = mc_client.get(key)
     if cached is not None:
         return pickle.loads(cached)
Beispiel #2
0
 def from_cache_for_boat(cls, boat):
     key = '{}_{}'.format(cls.__name__, boat.id)
     cached = mc_client.get(key)
     if cached is not None:
         return pickle.loads(cached)
Beispiel #3
0
 def from_cache_by_mmsi(cls, mmsi):
     key = '{}_{}'.format(cls.__name__, mmsi)
     cached = mc_client.get(key)
     if cached is not None:
         return pickle.loads(cached)
Beispiel #4
0
 def get_cache(cls, id):
     key = '{}_{}'.format(cls.__name__, id)
     cached = mc_client.get(key)
     if cached is not None:
         return pickle.loads(cached)
Beispiel #5
0
 def from_cache_for_boat(cls, boat):
     key = '{}_{}'.format(cls.__name__, boat.id)
     cached = mc_client.get(key)
     if cached is not None:
         return pickle.loads(cached)
Beispiel #6
0
 def from_cache_by_mmsi(cls, mmsi):
     key = '{}_{}'.format(cls.__name__, mmsi)
     cached = mc_client.get(key)
     if cached is not None:
         return pickle.loads(cached)