feat: removed caching of list view

This commit is contained in:
Björn Fromme
2025-01-25 15:25:34 +01:00
parent f9e7f28b6b
commit 289668bcbd
2 changed files with 9 additions and 28 deletions
+3 -5
View File
@@ -39,10 +39,9 @@ class EditController extends AbstractController
}
// Fetch original bookingData data via API and cache result for a short ttl
$cacheKeyList = sprintf('bpn_bookings_%s', sha1($bpnUser->getUserIdentifier()));
$cacheKeySingle = sprintf('bpn_booking_%d', $id);
$cacheKey = sprintf('bpn_booking_%d', $id);
try {
$bookingData = $this->cache->get($cacheKeySingle, function (ItemInterface $item) use ($bpnUser, $id) {
$bookingData = $this->cache->get($cacheKey, function (ItemInterface $item) use ($bpnUser, $id) {
$item->expiresAfter(300);
return $this->apiClient->getBooking($bpnUser->getEmail(), $bpnUser->getPassword(), $id);
@@ -90,8 +89,7 @@ class EditController extends AbstractController
$this->apiClient->updateBooking($formData);
try {
$this->cache->delete($cacheKeySingle);
$this->cache->delete($cacheKeyList);
$this->cache->delete($cacheKey);
} catch (InvalidArgumentException $e) {
}