DEV: No longer preload categories (#24950)

Categories will no longer be preloaded when `lazy_load_categories` is
enabled through PreloadStore.

Instead, the list of site categories will continue to be populated
by `Site.updateCategory` as more and more categories are being loaded
from different sources (topic lists, category selectors, etc).
This commit is contained in:
Bianca Nenciu
2023-12-28 14:36:33 +02:00
committed by GitHub
parent c4396c6acf
commit 14269232ba
8 changed files with 17 additions and 22 deletions
-11
View File
@@ -183,17 +183,6 @@ RSpec.describe Site do
DiscoursePluginRegistry.clear_modifiers!
end
end
context "when lazy_load_categories" do
before { SiteSetting.lazy_load_categories = true }
it "limits the number of categories" do
stub_const(Site, "LAZY_LOAD_CATEGORIES_LIMIT", 1) do
categories = Site.new(Guardian.new).categories
expect(categories.size).to eq(1)
end
end
end
end
it "omits groups user can not see" do