mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Remove cache.
This commit is contained in:
@@ -52,14 +52,6 @@ class Steam
|
|||||||
*/
|
*/
|
||||||
public function balanceIgnoreVirtual(Account $account, Carbon $date): string
|
public function balanceIgnoreVirtual(Account $account, Carbon $date): string
|
||||||
{
|
{
|
||||||
// abuse chart properties:
|
|
||||||
$cache = new CacheProperties;
|
|
||||||
$cache->addProperty($account->id);
|
|
||||||
$cache->addProperty('balance-no-virtual');
|
|
||||||
$cache->addProperty($date);
|
|
||||||
if ($cache->has()) {
|
|
||||||
return $cache->get();
|
|
||||||
}
|
|
||||||
/** @var AccountRepositoryInterface $repository */
|
/** @var AccountRepositoryInterface $repository */
|
||||||
$repository = app(AccountRepositoryInterface::class);
|
$repository = app(AccountRepositoryInterface::class);
|
||||||
$repository->setUser($account->user);
|
$repository->setUser($account->user);
|
||||||
@@ -81,11 +73,7 @@ class Steam
|
|||||||
->get(['transactions.foreign_amount'])->toArray();
|
->get(['transactions.foreign_amount'])->toArray();
|
||||||
|
|
||||||
$foreignBalance = $this->sumTransactions($transactions, 'foreign_amount');
|
$foreignBalance = $this->sumTransactions($transactions, 'foreign_amount');
|
||||||
$balance = bcadd($nativeBalance, $foreignBalance);
|
return bcadd($nativeBalance, $foreignBalance);
|
||||||
|
|
||||||
$cache->store($balance);
|
|
||||||
|
|
||||||
return $balance;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user