|
|
@ -22,8 +22,8 @@ class SystemConfigSerializer(serializers.ModelSerializer): |
|
|
|
fields = "__all__" |
|
|
|
fields = "__all__" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def invalid_config_cache(): |
|
|
|
def invalid_config_cache(key='*'): |
|
|
|
SystemConfigCache('*').del_many() |
|
|
|
SystemConfigCache(key).del_many() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# def make_json_value(value, default): |
|
|
|
# def make_json_value(value, default): |
|
|
@ -57,7 +57,7 @@ class ConfigCacheBase(object): |
|
|
|
if d_key != key and data is not None: |
|
|
|
if d_key != key and data is not None: |
|
|
|
db_data['value'] = data |
|
|
|
db_data['value'] = data |
|
|
|
db_data['key'] = key |
|
|
|
db_data['key'] = key |
|
|
|
cache.set_storage_cache(db_data, timeout=0) |
|
|
|
cache.set_storage_cache(db_data, timeout=60 * 60 * 24 * 30) |
|
|
|
return db_data.get('value') |
|
|
|
return db_data.get('value') |
|
|
|
|
|
|
|
|
|
|
|
def set_value(self, key, value): |
|
|
|
def set_value(self, key, value): |
|
|
|