From 525e7ad4cac6fff7bd0370828b06159d610573ef Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 20 Jan 2013 19:45:36 +0100 Subject: Added caching. --- app/views/call_routes/_index_core.html.haml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'app/views/call_routes/_index_core.html.haml') diff --git a/app/views/call_routes/_index_core.html.haml b/app/views/call_routes/_index_core.html.haml index aa22437..124f4d0 100644 --- a/app/views/call_routes/_index_core.html.haml +++ b/app/views/call_routes/_index_core.html.haml @@ -1,13 +1,15 @@ -%table - %tr - %th= t('call_routes.index.name') - %th= t('call_routes.index.endpoint_type') - %th= t('call_routes.index.endpoint_id') +- cache(['call_routes_table', call_routes.count, call_routes.reorder(:updated_at).last]) do + %table + %tr + %th= t('call_routes.index.name') + %th= t('call_routes.index.endpoint_type') + %th= t('call_routes.index.endpoint_id') - - reset_cycle - - for call_route in call_routes - %tr{:class => cycle('odd', 'even')} - %td= call_route.name - %td= call_route.endpoint_type - %td= call_route.endpoint_id - =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} \ No newline at end of file + - reset_cycle + - for call_route in call_routes + %tr{:class => cycle('odd', 'even')} + - cache(['call_route_single_table_row', call_route]) do + %td= call_route.name + %td= call_route.endpoint_type + %td= call_route.endpoint_id + =render :partial => 'shared/index_view_edit_destroy_part', :locals => {:child => call_route} \ No newline at end of file -- cgit v1.2.3