Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/SigmaREST.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,12 @@ protected function _authenticate(): void
}
$this->token = $token;

// Cache the access token for one hour
cache(['sigma_access_token' => $this->token], 60);
// Cache the access token for one hour.
// Use cache()->put() (positional TTL) rather than the array-set form cache([...], 60):
// under Laravel 12 the array-set helper calls app('cache')->put(key, value, ttl: $ttl)
// with a NAMED ttl argument, which CacheManager::__call forwards via ...$parameters and
// throws "Unknown named parameter $ttl" on stores whose put() does not name it $ttl.
cache()->put('sigma_access_token', $this->token, 60);
}

/**
Expand Down
Loading