cache query args with url as well

Without this, we can't use query args to get the hash of a file or add
query args to change what a file returns
This commit is contained in:
Daniel Wallace 2016-09-14 13:20:53 -05:00
parent b3aac0ec20
commit 70e7f6d58b

View file

@ -803,12 +803,17 @@ class Client(object):
elif not os.path.isabs(cachedir):
cachedir = os.path.join(self.opts['cachedir'], cachedir)
if url_data.query is not None:
file_name = '-'.join([url_data.path, url_data.query])
else:
file_name = url_data.path
return salt.utils.path_join(
cachedir,
'extrn_files',
saltenv,
netloc,
url_data.path
file_name
)