From 4998ea5affabefd4637160788e941c48a8e78350 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 20 Aug 2013 13:29:22 +0200 Subject: [PATCH] Moved activity limit to 20. --- lib/session.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/session.rb b/lib/session.rb index 96d55de3f..9d9993bf7 100644 --- a/lib/session.rb +++ b/lib/session.rb @@ -462,13 +462,13 @@ class UserState # activity steam cache_key = @cache_key + '_activity_stream' if CacheIn.expired(cache_key) - activity_stream = History.activity_stream( user ) + activity_stream = History.activity_stream( user, 20 ) activity_stream_cache = CacheIn.get( cache_key, { :re_expire => true } ) self.log 'notice', 'fetch activity_stream - ' + cache_key if activity_stream != activity_stream_cache self.log 'notify', 'fetch activity_stream changed - ' + cache_key - activity_stream_full = History.activity_stream_fulldata( user ) + activity_stream_full = History.activity_stream_fulldata( user, 20 ) CacheIn.set( cache_key, activity_stream, { :expires_in => 0.75.minutes } ) CacheIn.set( cache_key + '_push', activity_stream_full ) end