diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-09 15:15:45 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-07-09 15:15:45 +0200 |
commit | 6e0c596a1c79ec423de867f3c9738db31efa9c58 (patch) | |
tree | a6392cc351b0ff755842831c1a0d4343e7d8c0bf /app | |
parent | 901614267d4269e9d1ee64e346b31eb64b801010 (diff) | |
parent | 0d83ca4ff8727de409f91009ec7739f68cb3a877 (diff) | |
download | gitlab-ce-6e0c596a1c79ec423de867f3c9738db31efa9c58.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/projects_helper.rb | 4 | ||||
-rw-r--r-- | app/views/projects/show.html.haml | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index df1d630c89d..cef23a52e34 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -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 diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index d642690153f..5c2ac484ceb 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -50,7 +50,8 @@ = link_to namespace_project_edit_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)), class: 'light' do %i.fa.fa-pencil .wiki - = render_readme(readme) + = cache(readme_cache_key) do + = render_readme(readme) - else %h3.page-title This project does not have README yet |