mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 03:47:36 -02:30
Make cache compatible with encrypted settings
This saves the id value of the setting into the cache if the setting is encrypted. That can then be combined with the secret_key in order to decrypt the setting, without having to make an additional query to the database.
This commit is contained in:
@@ -74,6 +74,10 @@ class Setting(CreatedModifiedModel):
|
||||
def get_cache_key(self, key):
|
||||
return key
|
||||
|
||||
@classmethod
|
||||
def get_cache_id_key(self, key):
|
||||
return '{}_ID'.format(key)
|
||||
|
||||
|
||||
import awx.conf.signals # noqa
|
||||
|
||||
|
||||
Reference in New Issue
Block a user