Skip to content

Commit 3c1dac0

Browse files
GeLoLabsdbu
authored andcommitted
Cast max age to integer (#5)
Cast max age to integer to avoid problems with strict implementations
1 parent a9d59c1 commit 3c1dac0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
## UNRELEASED
4+
5+
### Fixed
6+
7+
- Cast max age header to integer in order to get valid expiration value.
38

49
## 1.0.0 - 2016-05-05
510

src/CachePlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private function getMaxAge(ResponseInterface $response)
174174
return $maxAge - ((int) $age);
175175
}
176176

177-
return $maxAge;
177+
return (int) $maxAge;
178178
}
179179

180180
// check for ttl in the Expires header

0 commit comments

Comments
 (0)