-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Description
| public IEnumerable<KeyValuePair<ArchiveData, int>> GetArchives(BlogPart blogPart) { |
In the current implementation, the query for the archive data is performed on every invocation of the method. For long-lived blogs this query fetches thousands of records from the database every time it's performed, and I don't think there's any need for that.
I propose it would be beneficial to cache its result, evicting those whenever a change to the archives is made (the methods invoked for that are in the BlogPartArchiveHandler).
Bonus, the "choice" between caching or not this could be controlled by a flag injectable from config file, so it's possible to decide about the tradeoff between doing the query more often vs storing stuff in memory on each tenant.
Metadata
Metadata
Assignees
Labels
No labels