From f191086adb366cea64ebad7b372410e0edf6a4c2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 27 Dec 2024 19:47:35 +0100 Subject: [PATCH] Enable cache again. --- app/Helpers/Report/NetWorth.php | 2 +- app/Http/Controllers/Chart/AccountController.php | 2 +- app/Http/Controllers/Chart/BillController.php | 2 +- app/Http/Controllers/Chart/BudgetController.php | 6 +++--- app/Http/Controllers/Chart/CategoryController.php | 6 +++--- app/Http/Controllers/Chart/ReportController.php | 2 +- app/Support/Http/Controllers/AugumentData.php | 2 +- app/Support/Http/Controllers/ChartGeneration.php | 2 +- app/Support/Http/Controllers/PeriodOverview.php | 2 +- app/Support/Steam.php | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/Helpers/Report/NetWorth.php b/app/Helpers/Report/NetWorth.php index 2b5c17c944..6fc0c3a0c1 100644 --- a/app/Helpers/Report/NetWorth.php +++ b/app/Helpers/Report/NetWorth.php @@ -74,7 +74,7 @@ class NetWorth implements NetWorthInterface $cache->addProperty('net-worth-by-accounts'); $cache->addProperty($ids); if ($cache->has()) { - // return $cache->get(); + return $cache->get(); } Log::debug(sprintf('Now in byAccounts("%s", "%s")', $ids, $date->format('Y-m-d H:i:s'))); $default = Amount::getDefaultCurrency(); diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index f2a3c6ea23..c3ffe5f1d2 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -426,7 +426,7 @@ class AccountController extends Controller $cache->addProperty($this->convertToNative); $cache->addProperty($account->id); if ($cache->has()) { - // return response()->json($cache->get()); + return response()->json($cache->get()); } // collect and filter balances for the entire period. diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php index 529a1170c8..e4cf002336 100644 --- a/app/Http/Controllers/Chart/BillController.php +++ b/app/Http/Controllers/Chart/BillController.php @@ -111,7 +111,7 @@ class BillController extends Controller $cache->addProperty($bill->id); $cache->addProperty($this->convertToNative); if ($cache->has()) { - // return response()->json($cache->get()); + return response()->json($cache->get()); } $locale = app('steam')->getLocale(); diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index b06bdf2bfb..f830264167 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -221,7 +221,7 @@ class BudgetController extends Controller $cache->addProperty($end); if ($cache->has()) { - // return response()->json($cache->get()); + return response()->json($cache->get()); } $collector->setRange($start, $end); $collector->setBudget($budget); @@ -385,7 +385,7 @@ class BudgetController extends Controller $cache->addProperty($end); if ($cache->has()) { - // return response()->json($cache->get()); + return response()->json($cache->get()); } $collector->setRange($start, $end); $collector->setTypes([TransactionType::WITHDRAWAL])->setBudget($budget)->withAccountInformation(); @@ -457,7 +457,7 @@ class BudgetController extends Controller $cache->addProperty($this->convertToNative); $cache->addProperty('chart.budget.frontpage'); if ($cache->has()) { - // return response()->json($cache->get()); + return response()->json($cache->get()); } Log::debug('Regenerate frontpage chart from scratch.'); $chartGenerator = app(FrontpageChartGenerator::class); diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index 91bd8b24e3..c48b8cf3ff 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -75,7 +75,7 @@ class CategoryController extends Controller $cache->addProperty($category->id); $cache->addProperty($this->convertToNative); if ($cache->has()) { - // return response()->json($cache->get()); + return response()->json($cache->get()); } /** @var CategoryRepositoryInterface $repository */ @@ -116,7 +116,7 @@ class CategoryController extends Controller $cache->addProperty($this->convertToNative); $cache->addProperty('chart.category.frontpage'); if ($cache->has()) { - // return response()->json($cache->get()); + return response()->json($cache->get()); } $frontpageGenerator = new FrontpageChartGenerator($start, $end); @@ -141,7 +141,7 @@ class CategoryController extends Controller $cache->addProperty($category); $cache->addProperty($this->convertToNative); if ($cache->has()) { - // return response()->json($cache->get()); + return response()->json($cache->get()); } $data = $this->reportPeriodChart($accounts, $start, $end, $category); diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 7c5db3052e..d538ebbd97 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -145,7 +145,7 @@ class ReportController extends Controller $cache->addProperty($accounts); $cache->addProperty($end); if ($cache->has()) { - // return response()->json($cache->get()); + return response()->json($cache->get()); } Log::debug('Going to do operations for accounts ', $accounts->pluck('id')->toArray()); diff --git a/app/Support/Http/Controllers/AugumentData.php b/app/Support/Http/Controllers/AugumentData.php index 574cad84c5..e3c39ea4b2 100644 --- a/app/Support/Http/Controllers/AugumentData.php +++ b/app/Support/Http/Controllers/AugumentData.php @@ -183,7 +183,7 @@ trait AugumentData $cache->addProperty('get-limits'); if ($cache->has()) { - // return $cache->get(); + return $cache->get(); } $set = $blRepository->getBudgetLimits($budget, $start, $end); diff --git a/app/Support/Http/Controllers/ChartGeneration.php b/app/Support/Http/Controllers/ChartGeneration.php index e66a202364..3fea9eada1 100644 --- a/app/Support/Http/Controllers/ChartGeneration.php +++ b/app/Support/Http/Controllers/ChartGeneration.php @@ -54,7 +54,7 @@ trait ChartGeneration $cache->addProperty($accounts); $cache->addProperty($convertToNative); if ($cache->has()) { - // return $cache->get(); + return $cache->get(); } app('log')->debug('Regenerate chart.account.account-balance-chart from scratch.'); $locale = app('steam')->getLocale(); diff --git a/app/Support/Http/Controllers/PeriodOverview.php b/app/Support/Http/Controllers/PeriodOverview.php index e1df4293c3..925438b375 100644 --- a/app/Support/Http/Controllers/PeriodOverview.php +++ b/app/Support/Http/Controllers/PeriodOverview.php @@ -333,7 +333,7 @@ trait PeriodOverview $cache->addProperty('no-budget-period-entries'); if ($cache->has()) { - // return $cache->get(); + return $cache->get(); } /** @var array $dates */ diff --git a/app/Support/Steam.php b/app/Support/Steam.php index 7d5ca78599..0201aefba0 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -84,7 +84,7 @@ class Steam $cache->addProperty($start); $cache->addProperty($end); if ($cache->has()) { - // return $cache->get(); + return $cache->get(); } $balances = [];