mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Cache summarization strategy results. (#22230)
Updates the interface for implementing summarization strategies and adds a cache layer to summarize topics once. The cache stores the final summary and each chunk used to build it, which will be useful when we have to extend or rebuild it.
This commit is contained in:
@@ -10,13 +10,13 @@ describe Summarization::Base do
|
||||
it "returns true if the user group is present in the custom_summarization_allowed_groups_map setting" do
|
||||
SiteSetting.custom_summarization_allowed_groups = group.id
|
||||
|
||||
expect(described_class.new(nil).can_request_summaries?(user)).to eq(true)
|
||||
expect(subject.can_request_summaries?(user)).to eq(true)
|
||||
end
|
||||
|
||||
it "returns false if the user group is not present in the custom_summarization_allowed_groups_map setting" do
|
||||
SiteSetting.custom_summarization_allowed_groups = ""
|
||||
|
||||
expect(described_class.new(nil).can_request_summaries?(user)).to eq(false)
|
||||
expect(subject.can_request_summaries?(user)).to eq(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user