Open edmondchui opened 9 years ago
add_column :forem_forums, :created_at, :datetime, null: false
add_column :forem_forums, :updated_at, :datetime, null: false
We don't have a need for them in forums (or categories for that matter). So when I created the forums table I probably removed them from there, but didn't do it when I created the categories table.
A possible use case for forem_forums to have timestamp could be when we use key-based caching (with updated_at being part of the cache key).
If there is any new or updated posts, we can touch the belonging topic and in turns the belonging forum. We can then use the timestamp-based cache key to check against the cache.
That sounds like a good idea. Please submit a patch to add these keys.
+1 on the key based caching. I recently looked at the source and none of the associations have touch: true
on them... so need another PR for that.
Is that intentional or oversight?
created_at
andupdated_at
exists inforem_categories
,forem_topics
,forem_posts
.