-
Notifications
You must be signed in to change notification settings - Fork 169
/
memcache_clear.tt
26 lines (22 loc) · 1.13 KB
/
memcache_clear.tt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
[%# Tool to clear memcache for a specific user
Authors:
Andrea Nall <anall@andreanall.com>
Copyright (c) 2015 by Dreamwidth Studios, LLC.
This program is free software; you may redistribute it and/or modify it under
the same terms as Perl itself. For a copy of the license, please reference
'perldoc perlartistic' or 'perldoc perlgpl'.
%]
[%- sections.title = '.admin.link' | ml -%]
[%- IF cleared -%]<p>[% '.cleared' | ml %]</p>[%- END -%]
[%- IF error -%]<p><strong>[% error %]</strong></p>[%- END -%]
<form action="/admin/memcache_clear" method="POST">
[% dw.form_auth %]
<div><label for="username">[% '.username.label' | ml %]</label><input id="username" name="username" /></div>
<div><label for="what">[% '.what.label' | ml %]</label><select id="what" name="what">
[%- FOREACH opt IN clear_options -%][%- opt.name = opt.name_ml | ml -%][%- END -%]
[%- FOREACH opt IN clear_options.sort_by_key( 'name', 'order', 'alpha' ) -%]
<option value="[% opt.key %]">[% opt.name %]</option>
[%- END -%]
</select></div>
<div><input type="submit" value="[% '.purge.btn' | ml %]" /></div>
</form>