From f9ab49911dee895bff3e2929c0bff054c7ef9434 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 15 Dec 2014 18:03:16 +0100 Subject: [PATCH] Bug fix where the account's balance would be cached when it shouldn't. --- app/lib/FireflyIII/Shared/Toolkit/Steam.php | 3 ++- bootstrap/start.php | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/lib/FireflyIII/Shared/Toolkit/Steam.php b/app/lib/FireflyIII/Shared/Toolkit/Steam.php index 248ae8d9cd..d1d0c9e0cd 100644 --- a/app/lib/FireflyIII/Shared/Toolkit/Steam.php +++ b/app/lib/FireflyIII/Shared/Toolkit/Steam.php @@ -29,7 +29,8 @@ class Steam $key = 'account.' . $account->id . '.balanceOn' . $date->format('dmy'); } if (\Cache::has($key)) { - return \Cache::get($key); + // TODO find a way to reliably remove cache entries for accounts. + #return \Cache::get($key); } $date = is_null($date) ? Carbon::now() : $date; $balance = floatval( diff --git a/bootstrap/start.php b/bootstrap/start.php index 17521dbcf5..1d6083d86d 100644 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -95,12 +95,14 @@ require $framework . '/Illuminate/Foundation/start.php'; //Event::subscribe('Firefly\Trigger\Budgets\EloquentBudgetTrigger'); //Event::subscribe('Firefly\Trigger\Recurring\EloquentRecurringTrigger'); //Event::subscribe('Firefly\Trigger\Journals\EloquentJournalTrigger'); -Event::subscribe('FireflyIII\Event\Piggybank'); -Event::subscribe('FireflyIII\Event\Budget'); -Event::subscribe('FireflyIII\Event\TransactionJournal'); -Event::subscribe('FireflyIII\Event\Transaction'); + Event::subscribe('FireflyIII\Event\Account'); +Event::subscribe('FireflyIII\Event\Budget'); Event::subscribe('FireflyIII\Event\Event'); +Event::subscribe('FireflyIII\Event\Piggybank'); +Event::subscribe('FireflyIII\Event\Transaction'); +Event::subscribe('FireflyIII\Event\TransactionJournal'); + // event that creates a relationship between transaction journals and recurring events when created. // event that updates the relationship between transaction journals and recurring events when edited.