feat: allow superadmins to reset cache keys for IndexedDB (#7180)
Allows super admins to reset the cache for an account. This will force the front end to fetch the data again on the next load. fixes: https://linear.app/chatwoot/issue/CW-1817 Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
9
app/views/super_admin/accounts/_reset_cache.html.erb
Normal file
9
app/views/super_admin/accounts/_reset_cache.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<section class="main-content__body">
|
||||
<hr/>
|
||||
<%= form_for([:reset_cache, namespace, page.resource], method: :post, html: { class: "form" }) do |f| %>
|
||||
<div class="form-actions">
|
||||
<p>This will clear the IndexedDB cache keys from redis. <br>The next load will fetch the data from backend.</p>
|
||||
<%= f.submit 'Reset Frontend Cache' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</section>
|
||||
@@ -87,3 +87,5 @@ as well as a link to its edit page.
|
||||
</section>
|
||||
|
||||
<%= render partial: "seed_data", locals: {page: page} %>
|
||||
|
||||
<%= render partial: "reset_cache", locals: {page: page} %>
|
||||
|
||||
Reference in New Issue
Block a user