[Rt-commit] rt branch, 4.4/queue-summary-cache, repushed
? sunnavy
sunnavy at bestpractical.com
Thu Dec 20 09:34:16 EST 2018
The branch 4.4/queue-summary-cache was deleted and repushed:
was 04474afe8f273f12e8f946476f92d635d267cdb0
now 339640533b06390f547a4b2b7a9cb5366adbcdeb
1: 696fd84845 ! 1: 060d884b59 Add test for contents of user session
@@ -35,7 +35,10 @@
+my $ids_ref = RT::Interface::Web::Session->Ids();
+
+# Should only have one session id at this point.
-+is( scalar @$ids_ref, 1, 'Got just one session id');
++TODO: {
++ local $TODO = 'SQLite has shared file sessions' if RT->Config->Get('DatabaseType') eq 'SQLite';
++ is( scalar @$ids_ref, 1, 'Got just one session id');
++}
+
+diag 'Load session for root user';
+my %session;
@@ -64,6 +67,5 @@
+is ($last_updated, $session{'SelectObject---RT::Queue---' . $user_id . '---CreateTicket---0'}{'lastupdated'},
+ "lastupdated is still $last_updated");
+
-+undef $agent;
+done_testing;
2: 5fe5443f89 ! 2: 5fb98f4920 Move session cache code to a function for easier access
@@ -70,6 +70,7 @@
+ $collection->UnLimit;
+
+ $HTML::Mason::Commands::m->callback( CallbackName => 'ModifyCollection',
++ CallbackPage => '/Elements/Quicksearch',
+ ARGSRef => \%args, Collection => $collection, ObjectType => $ObjectType );
+
+ # This is included for continuity in the 4.2 series. It will be removed in 4.6.
3: 6d99de50c9 ! 3: 5794ddb936 Add caching to the queue list portlet
@@ -31,14 +31,6 @@
@_ );
my $ObjectType = $args{'ObjectType'};
-@@
- $collection->UnLimit;
-
- $HTML::Mason::Commands::m->callback( CallbackName => 'ModifyCollection',
-+ CallbackPage => '/Elements/Quicksearch',
- ARGSRef => \%args, Collection => $collection, ObjectType => $ObjectType );
-
- # This is included for continuity in the 4.2 series. It will be removed in 4.6.
@@
or not $CheckRight
or $session{CurrentUser}->HasRight( Object => $object, Right => $CheckRight ))
@@ -53,19 +45,6 @@
$session{$cache_key}{id}{ $object->id } = 1;
}
-diff --git a/share/html/Asset/Elements/SelectCatalog b/share/html/Asset/Elements/SelectCatalog
---- a/share/html/Asset/Elements/SelectCatalog
-+++ b/share/html/Asset/Elements/SelectCatalog
-@@
- CheckRight => "CreateAsset",
- %ARGS,
- ObjectType => "Catalog",
-- CacheNeedsUpdate => RT::Catalog->CacheNeedsUpdate,
-+ CacheNeedsUpdate => (RT::Catalog->CacheNeedsUpdate ? time() : 0),
- Default => $Default,
- &>
- <%args>
-
diff --git a/share/html/Elements/QueueList b/share/html/Elements/QueueList
--- a/share/html/Elements/QueueList
+++ b/share/html/Elements/QueueList
@@ -81,14 +60,11 @@
<%INIT>
my $unwanted = $session{'CurrentUser'}->UserObj->Preferences('QueueList', {});
my $comp = $SplitByLifecycle? '/Elements/QueueSummaryByLifecycle' : '/Elements/QueueSummaryByStatus';
-+
-+
-+
+my $cache_key = SetObjectSessionCache(
+ ObjectType => 'RT::Queue',
+ CheckRight => 'ShowTicket',
+ ShowAll => 0,
-+ CacheNeedsUpdate => (RT->System->QueueCacheNeedsUpdate ? time() : 0),
++ CacheNeedsUpdate => RT->System->QueueCacheNeedsUpdate,
+ Exclude => $unwanted,
+);
+
@@ -239,28 +215,3 @@
+$queues => undef
</%ARGS>
-diff --git a/share/html/Elements/Quicksearch b/share/html/Elements/Quicksearch
---- a/share/html/Elements/Quicksearch
-+++ b/share/html/Elements/Quicksearch
-@@
- %# those contributions and any derivatives thereof.
- %#
- %# END BPS TAGGED BLOCK }}}
-+
- <& QueueList, %ARGS &>
-
- <%INIT>
-
-diff --git a/share/html/Elements/SelectQueue b/share/html/Elements/SelectQueue
---- a/share/html/Elements/SelectQueue
-+++ b/share/html/Elements/SelectQueue
-@@
- ObjectType => "Queue",
- CheckRight => $CheckQueueRight,
- ShowAll => $ShowAllQueues,
-- CacheNeedsUpdate => RT->System->QueueCacheNeedsUpdate,
-+ CacheNeedsUpdate => (RT->System->QueueCacheNeedsUpdate ? time() : 0),
- &>
- %}
- <%args>
-
4: 16c0f4ccb8 ! 4: fa84bef0e2 Update other portlets using SummaryByStatus
@@ -14,19 +14,6 @@
RT->System->QueueCacheNeedsUpdate(1);
});
-
-diff --git a/share/html/Asset/Elements/SelectCatalog b/share/html/Asset/Elements/SelectCatalog
---- a/share/html/Asset/Elements/SelectCatalog
-+++ b/share/html/Asset/Elements/SelectCatalog
-@@
- CheckRight => "CreateAsset",
- %ARGS,
- ObjectType => "Catalog",
-- CacheNeedsUpdate => (RT::Catalog->CacheNeedsUpdate ? time() : 0),
-+ CacheNeedsUpdate => RT::Catalog->CacheNeedsUpdate,
- Default => $Default,
- &>
- <%args>
diff --git a/share/html/Elements/MyAdminQueues b/share/html/Elements/MyAdminQueues
--- a/share/html/Elements/MyAdminQueues
@@ -80,29 +67,3 @@
+
+</%INIT>
-diff --git a/share/html/Elements/QueueList b/share/html/Elements/QueueList
---- a/share/html/Elements/QueueList
-+++ b/share/html/Elements/QueueList
-@@
- ObjectType => 'RT::Queue',
- CheckRight => 'ShowTicket',
- ShowAll => 0,
-- CacheNeedsUpdate => (RT->System->QueueCacheNeedsUpdate ? time() : 0),
-+ CacheNeedsUpdate => RT->System->QueueCacheNeedsUpdate,
- Exclude => $unwanted,
- );
-
-
-diff --git a/share/html/Elements/SelectQueue b/share/html/Elements/SelectQueue
---- a/share/html/Elements/SelectQueue
-+++ b/share/html/Elements/SelectQueue
-@@
- ObjectType => "Queue",
- CheckRight => $CheckQueueRight,
- ShowAll => $ShowAllQueues,
-- CacheNeedsUpdate => (RT->System->QueueCacheNeedsUpdate ? time() : 0),
-+ CacheNeedsUpdate => RT->System->QueueCacheNeedsUpdate,
- &>
- %}
- <%args>
-
5: 04474afe8f = 5: 339640533b Clear queue list caches after pref change
More information about the rt-commit
mailing list