Example #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)
Example #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)
Example #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)
Example #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)
Example #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)
Example #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)