mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Remove cache for #1778
This commit is contained in:
@@ -100,14 +100,6 @@ class AutoCompleteController extends Controller
|
|||||||
$unfiltered = null;
|
$unfiltered = null;
|
||||||
$filtered = 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.
|
// search for all accounts.
|
||||||
if ('all-accounts' === $subject) {
|
if ('all-accounts' === $subject) {
|
||||||
$unfiltered = $this->getAccounts(
|
$unfiltered = $this->getAccounts(
|
||||||
@@ -167,7 +159,6 @@ class AutoCompleteController extends Controller
|
|||||||
if (null === $filtered) {
|
if (null === $filtered) {
|
||||||
throw new FireflyException(sprintf('Auto complete handler cannot handle "%s"', $subject)); // @codeCoverageIgnore
|
throw new FireflyException(sprintf('Auto complete handler cannot handle "%s"', $subject)); // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
$cache->store($filtered);
|
|
||||||
|
|
||||||
return response()->json($filtered);
|
return response()->json($filtered);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user