Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)