mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 11:25:24 +00:00
The query is being executed each time we try and generate the link path for a stylesheet within the duration of a reqeust. Categories are not updated that often so repeating this query multiple times a request is wasteful. At the time of this commit, there is a `publish_discourse_stylesheet` ActiveRecord callback on the `Category` model which clears the cache of `Stylesheet::Manager` each time a category is saved.