From 8126818604da82c94ad57754bab91567e9426099 Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Sat, 14 Aug 2010 19:04:25 -0300 Subject: [PATCH] No cache for logged in users. At all. --- features/http_caching.feature | 9 +++++++++ vendor/plugins/noosfero_caching/init.rb | 1 + 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/features/http_caching.feature b/features/http_caching.feature index f3ad1bc..59fc422 100644 --- a/features/http_caching.feature +++ b/features/http_caching.feature @@ -58,3 +58,12 @@ Feature: HTTP caching When I go to /admin Then there must be no cache at all + Scenario: logged in user in the homepage + Given I am logged in as "joao" + When I go to the homepage + Then there must be no cache at all + + Scenario: logged in user in a profile page + Given I am logged in as "joao" + When I go to /joao + Then there must be no cache at all diff --git a/vendor/plugins/noosfero_caching/init.rb b/vendor/plugins/noosfero_caching/init.rb index 9dc7e67..4fe24cb 100644 --- a/vendor/plugins/noosfero_caching/init.rb +++ b/vendor/plugins/noosfero_caching/init.rb @@ -7,6 +7,7 @@ module NoosferoHttpCaching end def noosfero_set_cache + return if logged_in? n = nil if profile unless request.path =~ /^\/myprofile/ -- libgit2 0.21.2