mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 04:40:22 -07:00
remove redundant md5 hashing
This commit is contained in:
parent
c2cd132828
commit
d590f10d32
2 changed files with 4 additions and 6 deletions
|
@ -250,7 +250,7 @@ class Cacheable(object):
|
|||
_cache = {}
|
||||
|
||||
def get_cache_key(self, path):
|
||||
return "{0}_{1}_{2}".format(self.NAME, self._get_cache_prefix(path), self._get_config_identifier(path))
|
||||
return "{0}_{1}".format(self.NAME, self._get_cache_prefix(path))
|
||||
|
||||
def _get_cache_prefix(self, path):
|
||||
''' create predictable unique prefix for plugin/inventory '''
|
||||
|
@ -265,11 +265,6 @@ class Cacheable(object):
|
|||
|
||||
return 's_'.join([d1[:5], d2[:5]])
|
||||
|
||||
def _get_config_identifier(self, path):
|
||||
''' create predictable config-specific prefix for plugin/inventory '''
|
||||
|
||||
return hashlib.md5(path.encode()).hexdigest()
|
||||
|
||||
def clear_cache(self):
|
||||
self._cache = {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue