From 55333156ac954123afa9925c632a0ae4a420e67c Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 24 Dec 2015 10:14:01 +0100 Subject: [PATCH] Better cache control for some charts. --- app/Http/Controllers/Chart/BudgetController.php | 2 ++ app/Http/Controllers/Chart/CategoryController.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index e943310c69..05515f27af 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -283,6 +283,8 @@ class BudgetController extends Controller $cache = new CacheProperties(); $cache->addProperty($start); $cache->addProperty($end); + $cache->addProperty($report_type); + $cache->addProperty($accounts); $cache->addProperty('budget'); $cache->addProperty('year'); if ($cache->has()) { diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index ec7dafbef5..cca2c2d5a3 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -303,7 +303,9 @@ class CategoryController extends Controller $cache = new CacheProperties; // chart properties for cache: $cache->addProperty($start); + $cache->addProperty($report_type); $cache->addProperty($end); + $cache->addProperty($accounts); $cache->addProperty('category'); $cache->addProperty('spent-in-year'); if ($cache->has()) { @@ -361,6 +363,8 @@ class CategoryController extends Controller $cache = new CacheProperties; // chart properties for cache: $cache->addProperty($start); $cache->addProperty($end); + $cache->addProperty($report_type); + $cache->addProperty($accounts); $cache->addProperty('category'); $cache->addProperty('earned-in-year'); if ($cache->has()) {