Enable caching. Remove stuff for development.

This commit is contained in:
James Cole
2016-05-15 14:48:21 +02:00
parent 5065b1ee03
commit a84de5db77
22 changed files with 27 additions and 964 deletions

View File

@@ -250,8 +250,8 @@ class AccountController extends Controller
if ($cache->has()) {
//$entries = $cache->get();
//return view('categories.show', compact('category', 'journals', 'entries', 'hideCategory', 'subTitle'));
$entries = $cache->get();
return view('accounts.show', compact('account', 'what', 'entries', 'subTitleIcon', 'journals', 'subTitle'));
}

View File

@@ -53,7 +53,7 @@ class AccountController extends Controller
$cache->addProperty('expenseAccounts');
$cache->addProperty('accounts');
if ($cache->has()) {
// return Response::json($cache->get());
return Response::json($cache->get());
}
$accounts = $repository->getAccountsByType(['Expense account', 'Beneficiary account']);
@@ -105,7 +105,7 @@ class AccountController extends Controller
$cache->addProperty('frontpage');
$cache->addProperty('accounts');
if ($cache->has()) {
// return Response::json($cache->get());
return Response::json($cache->get());
}
$frontPage = Preferences::get('frontPageAccounts', $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray());
@@ -151,7 +151,7 @@ class AccountController extends Controller
$cache->addProperty('default');
$cache->addProperty($accounts);
if ($cache->has()) {
// return Response::json($cache->get());
return Response::json($cache->get());
}
foreach ($accounts as $account) {
@@ -196,7 +196,7 @@ class AccountController extends Controller
$cache->addProperty('single');
$cache->addProperty($account->id);
if ($cache->has()) {
// return Response::json($cache->get());
return Response::json($cache->get());
}
$format = (string)trans('config.month_and_day');

View File

@@ -308,7 +308,7 @@ class CategoryController extends Controller
$cache->addProperty('specific-period');
if ($cache->has()) {
// return $cache->get();
return $cache->get();
}
$entries = new Collection;
Log::debug('Start is ' . $start . ' en end is ' . $end);

View File

@@ -100,7 +100,7 @@ class ReportController extends Controller
$cache->addProperty($accounts);
$cache->addProperty($end);
if ($cache->has()) {
// return Response::json($cache->get());
return Response::json($cache->get());
}
// always per month.