Skip to content

Commit

Permalink
Remove cache for #1778
Browse files Browse the repository at this point in the history
  • Loading branch information
JC5 committed Oct 12, 2018
1 parent 940323c commit cf11dfe
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions app/Http/Controllers/Json/AutoCompleteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,6 @@ public function autoComplete(Request $request, string $subject): JsonResponse
$unfiltered = null;
$filtered = null;

$cache = new CacheProperties;
$cache->addProperty($subject);
// very unlikely a user will actually search for this string.
$key = '' === $search ? 'skjf0893j89fj2398hd89dh289h2398hr7isd8900828u209ujnxs88929282u' : $search;
$cache->addProperty($key);
if ($cache->has()) {
return response()->json($cache->get()); // @codeCoverageIgnore
}
// search for all accounts.
if ('all-accounts' === $subject) {
$unfiltered = $this->getAccounts(
Expand Down Expand Up @@ -167,7 +159,6 @@ public function autoComplete(Request $request, string $subject): JsonResponse
if (null === $filtered) {
throw new FireflyException(sprintf('Auto complete handler cannot handle "%s"', $subject)); // @codeCoverageIgnore
}
$cache->store($filtered);

return response()->json($filtered);
}
Expand Down

0 comments on commit cf11dfe

Please sign in to comment.