Skip to content

Commit cc8ac75

Browse files
committed
Added docs about isset
1 parent dfa5f17 commit cc8ac75

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/CachePlugin.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public function handleRequest(RequestInterface $request, callable $next, callabl
7474

7575
if ($cacheItem->isHit()) {
7676
$data = $cacheItem->get();
77+
// The isset() is to be removed in 2.0.
7778
if (isset($data['expiresAt']) && time() < $data['expiresAt']) {
7879
// This item is still valid according to previous cache headers
7980
return new FulfilledPromise($this->createResponseFromCacheItem($cacheItem));
@@ -273,6 +274,7 @@ private function createResponseFromCacheItem(CacheItemInterface $cacheItem)
273274
private function getModifiedSinceHeaderValue(CacheItemInterface $cacheItem)
274275
{
275276
$data = $cacheItem->get();
277+
// The isset() is to be removed in 2.0.
276278
if (!isset($data['createdAt'])) {
277279
return;
278280
}
@@ -293,6 +295,7 @@ private function getModifiedSinceHeaderValue(CacheItemInterface $cacheItem)
293295
private function getETag(CacheItemInterface $cacheItem)
294296
{
295297
$data = $cacheItem->get();
298+
// The isset() is to be removed in 2.0.
296299
if (!isset($data['etag'])) {
297300
return;
298301
}

0 commit comments

Comments
 (0)