diff --git a/share/html/Helpers/Autocomplete/autohandler b/share/html/Helpers/Autocomplete/autohandler index a51884ac963..f5bd474ea60 100644 --- a/share/html/Helpers/Autocomplete/autohandler +++ b/share/html/Helpers/Autocomplete/autohandler @@ -46,8 +46,6 @@ %# %# END BPS TAGGED BLOCK }}} <%init> - RT::Interface::Web::CacheControlExpiresHeaders( Time => 2 * 60 ); - - $m->call_next; +$m->comp('/Elements/HttpResponseHeaders', MaxAgeSeconds => 2 * 60); +$m->call_next; - diff --git a/share/html/Helpers/RightsInspector/Search b/share/html/Helpers/RightsInspector/Search index f3829c8f4ad..7f82bf6de9e 100644 --- a/share/html/Helpers/RightsInspector/Search +++ b/share/html/Helpers/RightsInspector/Search @@ -49,7 +49,7 @@ use RT::RightsInspector; my $results = RT::RightsInspector->Search(%ARGS); $r->content_type('application/json; charset=utf-8'); -RT::Interface::Web::CacheControlExpiresHeaders( Time => 'no-cache' ); +$m->comp('/Elements/HttpResponseHeaders'); $m->out(JSON($results)); $m->abort; diff --git a/share/html/Helpers/autohandler b/share/html/Helpers/autohandler index 870487a8cf2..9247a4195a6 100644 --- a/share/html/Helpers/autohandler +++ b/share/html/Helpers/autohandler @@ -46,7 +46,6 @@ %# %# END BPS TAGGED BLOCK }}} <%init> - RT::Interface::Web::CacheControlExpiresHeaders( Time => 'no-cache' ); - - $m->call_next; +$m->comp('/Elements/HttpResponseHeaders'); +$m->call_next; diff --git a/t/web/helpers-http-cache-headers.t b/t/web/helpers-http-cache-headers.t index 2e661a231b7..cb8799d119a 100644 --- a/t/web/helpers-http-cache-headers.t +++ b/t/web/helpers-http-cache-headers.t @@ -73,8 +73,8 @@ diag "set up expected date headers"; 'Expires' => 'Sun, 05 May 2013 15:28:19 GMT', }, default => { - 'Cache-Control' => 'no-cache', - 'Expires' => 'Fri, 05 Apr 2013 15:28:19 GMT', + 'Cache-Control' => 'no-cache, max-age=0', + 'Expires' => 'Fri, 05 Apr 2013 15:27:49 GMT', }, };