summaryrefslogtreecommitdiff
path: root/vendor/illuminate/cache
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/illuminate/cache')
-rwxr-xr-xvendor/illuminate/cache/CacheManager.php1
-rw-r--r--vendor/illuminate/cache/DynamoDbStore.php2
-rwxr-xr-xvendor/illuminate/cache/FileStore.php8
3 files changed, 9 insertions, 2 deletions
diff --git a/vendor/illuminate/cache/CacheManager.php b/vendor/illuminate/cache/CacheManager.php
index ecd51eeaaa..8c72c8146e 100755
--- a/vendor/illuminate/cache/CacheManager.php
+++ b/vendor/illuminate/cache/CacheManager.php
@@ -229,6 +229,7 @@ class CacheManager implements FactoryContract
$dynamoConfig = [
'region' => $config['region'],
'version' => 'latest',
+ 'endpoint' => $config['endpoint'] ?? null,
];
if ($config['key'] && $config['secret']) {
diff --git a/vendor/illuminate/cache/DynamoDbStore.php b/vendor/illuminate/cache/DynamoDbStore.php
index de55d2ec15..d5c84d6af4 100644
--- a/vendor/illuminate/cache/DynamoDbStore.php
+++ b/vendor/illuminate/cache/DynamoDbStore.php
@@ -390,7 +390,7 @@ class DynamoDbStore implements Store, LockProvider
*/
public function forever($key, $value)
{
- return $this->put($key, $value, now()->addYears(5));
+ return $this->put($key, $value, now()->addYears(5)->getTimestamp());
}
/**
diff --git a/vendor/illuminate/cache/FileStore.php b/vendor/illuminate/cache/FileStore.php
index f48ebc2b19..228d69976e 100755
--- a/vendor/illuminate/cache/FileStore.php
+++ b/vendor/illuminate/cache/FileStore.php
@@ -186,7 +186,13 @@ class FileStore implements Store
return $this->emptyPayload();
}
- $data = unserialize(substr($contents, 10));
+ try {
+ $data = unserialize(substr($contents, 10));
+ } catch (Exception $e) {
+ $this->forget($key);
+
+ return $this->emptyPayload();
+ }
// Next, we'll extract the number of seconds that are remaining for a cache
// so that we can properly retain the time for things like the increment