mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 13:31:18 +08:00
PERF: store topic views in a topic view table
* cut down on storage of the work Topic, 3 times per row (in 2 indexes) * only store one view per user per topic * only store one view per ip per topic
This commit is contained in:
@ -587,7 +587,7 @@ describe TopicsController do
|
||||
end
|
||||
|
||||
it 'records a view' do
|
||||
lambda { xhr :get, :show, topic_id: topic.id, slug: topic.slug }.should change(View, :count).by(1)
|
||||
lambda { xhr :get, :show, topic_id: topic.id, slug: topic.slug }.should change(TopicViewItem, :count).by(1)
|
||||
end
|
||||
|
||||
it 'records incoming links' do
|
||||
|
Reference in New Issue
Block a user