Skip to content

Commit

Permalink
Hide option to clear redis cache
Browse files Browse the repository at this point in the history
Don't make it tempting to do this
  • Loading branch information
mouse-reeve committed Aug 24, 2024
1 parent 6c252c1 commit ace0bf4
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions bookwyrm/templates/settings/redis.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,15 @@ <h2>{% trans "Outdated cache keys" %}</h2>
</section>

<section class="block content">
<h2>{% trans "Clear Django cache" %}</h2>
<div class="box">
<h2>{% trans "Advanced" %}</h2>
<details class="details-panel box">
<summary>
<span class="title is-5" role="headind" aria-level="3">
{% trans "Clear Django Cache" %}
</span>
<span class="details-close icon icon-x" aria-hidden="true"></span>
</summary>

<p>
{% blocktrans trimmed %}
This is <strong>NOT recommended</strong> and should only be used if something has gone very wrong with your cache. All sessions will be cleared and users will be logged out of their accounts.
Expand All @@ -86,10 +93,12 @@ <h2>{% trans "Clear Django cache" %}</h2>
<form name="erase-keys" method="POST" action="{% url 'settings-redis' %}">
{% csrf_token %}
<input type="hidden" name="erase_cache" value="True">
<button type="submit" class="button is-danger">{% trans "Erase cache" %}</button>
<div class="control">
<button type="submit" class="button is-danger">{% trans "Erase cache" %}</button>
</div>
</form>
{% endif %}
</div>
</details>
</section>

{% else %}
Expand Down

0 comments on commit ace0bf4

Please sign in to comment.