Esempio n. 1
0
 def get_metadata(self, identifier):
     if identifier in self.ia_cache:
         logger.info("IA metadata cache hit")
         return self.ia_cache[identifier]
     else:
         logger.info("IA metadata cache miss")
         return ia.get_metadata_direct(identifier)
Esempio n. 2
0
 def get_metadata(self, identifier):
     if identifier in self.ia_cache:
         logger.debug("IA metadata cache hit")
         return self.ia_cache[identifier]
     elif not is_valid_ocaid(identifier):
         return None
     else:
         logger.debug("IA metadata cache miss")
         return ia.get_metadata_direct(identifier)