Commit 53350fb34f4bb430c01df430ebee6ab38a466ae4
1 parent
b4462f80
Exists in
master
and in
22 other branches
Using cache_key instead of identifier to caches profile's page
(ActionItem1550)
Showing
3 changed files
with
6 additions
and
6 deletions
Show diff stats
app/models/person.rb
... | ... | @@ -270,20 +270,20 @@ class Person < Profile |
270 | 270 | |
271 | 271 | def communities_cache_key(params = {}) |
272 | 272 | page = params[:npage] || '1' |
273 | - identifier + '-communities-page-' + page | |
273 | + cache_key + '-communities-page-' + page | |
274 | 274 | end |
275 | 275 | |
276 | 276 | def friends_cache_key(params = {}) |
277 | 277 | page = params[:npage] || '1' |
278 | - identifier + '-friends-page-' + page | |
278 | + cache_key + '-friends-page-' + page | |
279 | 279 | end |
280 | 280 | |
281 | 281 | def manage_friends_cache_key(params = {}) |
282 | 282 | page = params[:npage] || '1' |
283 | - identifier + '-manage-friends-page-' + page | |
283 | + cache_key + '-manage-friends-page-' + page | |
284 | 284 | end |
285 | 285 | |
286 | 286 | def relationships_cache_key |
287 | - identifier + '-profile-relationships' | |
287 | + cache_key + '-profile-relationships' | |
288 | 288 | end |
289 | 289 | end | ... | ... |
app/models/profile.rb
app/views/profile/index.rhtml
... | ... | @@ -16,7 +16,7 @@ |
16 | 16 | <%= render :partial => partial_for_class(profile.class) %> |
17 | 17 | |
18 | 18 | <% unless @action %> |
19 | - <% cache_timeout(profile.identifier + '-profile-general-info', 4.hours.from_now) do %> | |
19 | + <% cache_timeout(profile.cache_key + '-profile-general-info', 4.hours.from_now) do %> | |
20 | 20 | <tr> |
21 | 21 | <th colspan='2'> |
22 | 22 | <%= _('Content') %> | ... | ... |