feat: removed caching of list view
This commit is contained in:
@@ -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) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user