PERF: Cache About#stats.

This commit is contained in:
Guo Xiang Tan
2015-07-07 12:52:19 +08:00
parent 8be37193ee
commit b0ea6764e0
12 changed files with 121 additions and 19 deletions

View File

@@ -8,4 +8,8 @@ class AboutSerializer < ApplicationSerializer
:locale,
:version,
:https
def stats
object.class.fetch_cached_stats || Jobs::AboutStats.new.execute({})
end
end