def get_azure_secret_value(self, vault_name, key_name, version=None, **kwargs): ''' @dev get secret from azure key vault @param vault_name name of key vault @param key_name the name of secret @param key_value the value of secret @return value of secret(KeyVaultSecret) ''' secret = None update_mempool = True key = self.create_memory_key_with_args(vault_name, key_name, version, "value") if self.use_mempool: secret = self.get_memory_key_value(key) if not secret: secret = azure_get_secret(vault_name, key_name, version, **kwargs).value else: update_mempool = False else: secret = azure_get_secret(vault_name, key_name, version, **kwargs).value if update_mempool: self.set_memory_key_value(key, secret) return secret