Commit 8126818604da82c94ad57754bab91567e9426099
1 parent
1df72533
Exists in
master
and in
29 other branches
No cache for logged in users. At all.
(ActionItem1608)
Showing
2 changed files
with
10 additions
and
0 deletions
Show diff stats
features/http_caching.feature
@@ -58,3 +58,12 @@ Feature: HTTP caching | @@ -58,3 +58,12 @@ Feature: HTTP caching | ||
58 | When I go to /admin | 58 | When I go to /admin |
59 | Then there must be no cache at all | 59 | Then there must be no cache at all |
60 | 60 | ||
61 | + Scenario: logged in user in the homepage | ||
62 | + Given I am logged in as "joao" | ||
63 | + When I go to the homepage | ||
64 | + Then there must be no cache at all | ||
65 | + | ||
66 | + Scenario: logged in user in a profile page | ||
67 | + Given I am logged in as "joao" | ||
68 | + When I go to /joao | ||
69 | + Then there must be no cache at all |
vendor/plugins/noosfero_caching/init.rb
@@ -7,6 +7,7 @@ module NoosferoHttpCaching | @@ -7,6 +7,7 @@ module NoosferoHttpCaching | ||
7 | end | 7 | end |
8 | 8 | ||
9 | def noosfero_set_cache | 9 | def noosfero_set_cache |
10 | + return if logged_in? | ||
10 | n = nil | 11 | n = nil |
11 | if profile | 12 | if profile |
12 | unless request.path =~ /^\/myprofile/ | 13 | unless request.path =~ /^\/myprofile/ |