add clear cache platform admin page

a form that allows you to clear entries from the cache for all of
either users, services or templates. It'll tell you the largest amount
of keys deleted, since there are multiple keys associated with each
model.
This commit is contained in:
Leo Hemsted
2019-02-15 10:27:38 +00:00
parent f6513613d3
commit 1dcba53daf
5 changed files with 85 additions and 2 deletions

View File

@@ -1281,3 +1281,15 @@ class TemplateAndFoldersSelectionForm(Form):
required_for_ops('add-new-template'),
Optional(),
], required_message='Select the type of template you want to add')
class ClearCacheForm(StripWhitespaceForm):
model_type = RadioField(
'What do you want to clear today',
choices=[
('user', 'Users'),
('service', 'Services'),
('template', 'Templates')
],
validators=[DataRequired()]
)