<%
  self.page_title = "Pages"
  self.page_description = "All pages / " + link_to("Deleted pages", deleted_admin_pages_path(@locale))

  if PagesCore.config.localizations?
    self.page_description_links = 'In ' + PagesCore.config.locales.map{ |l, n| link_to_unless_current n, admin_pages_path(l) }.join(link_separator)
  end
%>

<% content_for :sidebar do %>
<% end %>

<div class="content">
  <% cache Page.visible.roots.to_a + [current_user] do %>
    <%= react_component(
      "PageTree", {
        pages: @pages.map { |p| page_json(p) },
        locale: @locale,
        permissions: [(:create if policy(Page).create?)] }
    ) %>
  <% end %>
</div>

<%
  self.page_title = "Pages"
  self.page_description = "All pages / " + link_to("Deleted pages", deleted_admin_pages_path(@locale))

  if PagesCore.config.localizations?
    self.page_description_links = 'In ' + PagesCore.config.locales.map{ |l, n| link_to_unless_current n, admin_pages_path(l) }.join(link_separator)
  end
%>

<% content_for :sidebar do %>
<% end %>

<div class="content">
  <% cache Page.visible.roots.to_a + [current_user, @locale] do %>
    <%= react_component(
      "PageTree", {
        pages: @pages.map { |p| page_json(p) },
        locale: @locale,
        permissions: [(:create if policy(Page).create?)] }
    ) %>
  <% end %>
</div>

Add locale to cache key for Pages index
Add locale to cache key for Pages index
