Commit 635ffe48 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Cache readme rendering result

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 5309dad4
......@@ -272,4 +272,8 @@ module ProjectsHelper
current_user.recent_push(@project.id)
end
end
def readme_cache_key
[@project.id, @project.commit.sha, "readme"].join('-')
end
end
......@@ -49,6 +49,7 @@
%i.fa.fa-file
= readme.name
.wiki
= cache(readme_cache_key) do
= render_readme(readme)
- else
%h3.page-title
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment