mirror of
https://github.com/discourse/discourse.git
synced 2025-04-02 03:55:57 +08: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.