mirror of
https://github.com/ziirish/burp-ui.git
synced 2026-05-21 06:45:24 -06:00
increase cache duration
This commit is contained in:
parent
d97106c07e
commit
378a97601f
5 changed files with 11 additions and 7 deletions
|
|
@ -45,7 +45,7 @@ class ClientTree(Resource):
|
|||
'uid': fields.Integer(required=True, description='uid owner of the node'),
|
||||
})
|
||||
|
||||
@api.cache.cached(timeout=600, key_prefix=cache_key)
|
||||
@api.cache.cached(timeout=3600, key_prefix=cache_key)
|
||||
@api.marshal_list_with(node_fields, code=200, description='Success')
|
||||
@api.doc(
|
||||
params={
|
||||
|
|
@ -164,7 +164,7 @@ class ClientStats(Resource):
|
|||
'windows': fields.Boolean(required=True, description='Is the client a windows system'),
|
||||
})
|
||||
|
||||
@api.cache.cached(timeout=120, key_prefix=cache_key)
|
||||
@api.cache.cached(timeout=1800, key_prefix=cache_key)
|
||||
@api.marshal_with(stats_fields, code=200, description='Success')
|
||||
@api.doc(
|
||||
params={
|
||||
|
|
@ -380,7 +380,7 @@ class ClientReport(Resource):
|
|||
'date': fields.String(required=True, description='Human representation of the backup date'),
|
||||
})
|
||||
|
||||
@api.cache.cached(timeout=120, key_prefix=cache_key)
|
||||
@api.cache.cached(timeout=1800, key_prefix=cache_key)
|
||||
@api.marshal_list_with(client_fields, code=200, description='Success')
|
||||
@api.doc(
|
||||
params={
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ class ClientsReport(Resource):
|
|||
'clients': fields.Nested(client_fields, as_list=True, required=True),
|
||||
})
|
||||
|
||||
@api.cache.cached(timeout=120, key_prefix=cache_key)
|
||||
@api.cache.cached(timeout=1800, key_prefix=cache_key)
|
||||
@api.marshal_with(report_fields, code=200, description='Success')
|
||||
@api.doc(
|
||||
params={
|
||||
|
|
@ -306,7 +306,7 @@ class ClientsStats(Resource):
|
|||
'percent': fields.Integer(description='Percentage done'),
|
||||
})
|
||||
|
||||
@api.cache.cached(timeout=120, key_prefix=cache_key)
|
||||
@api.cache.cached(timeout=1800, key_prefix=cache_key)
|
||||
@api.marshal_list_with(client_fields, code=200, description='Success')
|
||||
@api.doc(
|
||||
params={
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ class About(Resource):
|
|||
'burp': fields.Nested(burp_fields, as_list=True, description='Burp version'),
|
||||
})
|
||||
|
||||
@api.cache.cached(timeout=300, key_prefix=cache_key)
|
||||
@api.cache.cached(timeout=3600, key_prefix=cache_key)
|
||||
@api.marshal_with(about_fields, code=200, description='Success')
|
||||
@api.doc(
|
||||
params={
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class ServersStats(Resource):
|
|||
'name': fields.String(required=True, description='Server name'),
|
||||
})
|
||||
|
||||
@api.cache.cached(timeout=120, key_prefix=cache_key)
|
||||
@api.cache.cached(timeout=1800, key_prefix=cache_key)
|
||||
@api.marshal_list_with(servers_fields, code=200, description='Success')
|
||||
@api.doc(
|
||||
responses={
|
||||
|
|
|
|||
|
|
@ -264,6 +264,8 @@ class NewClient(Resource):
|
|||
noti.append([3, '<a href="{}">Click here</a> to edit \'{}\' configuration'.format(url_for('view.cli_settings', server=server, client=newclient), newclient)])
|
||||
else:
|
||||
noti.append([3, '<a href="{}">Click here</a> to edit \'{}\' configuration'.format(url_for('view.cli_settings', client=newclient), newclient)])
|
||||
# clear the cache when we add a new client
|
||||
api.cache.clear()
|
||||
return {'notif': noti}, 201
|
||||
|
||||
|
||||
|
|
@ -305,4 +307,6 @@ class DeleteClient(Resource):
|
|||
api.bui.acl.is_admin(current_user.get_id())):
|
||||
api.abort(403, 'Sorry, you don\'t have rights to access the setting panel')
|
||||
|
||||
# clear the cache when we remove a client
|
||||
api.cache.clear()
|
||||
return {'notif': api.bui.cli.delete_client(client, server)}, 200
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue