Final Class Yiisoft\HttpMiddleware\HttpCache\CacheControlProvider\ConstantCacheControlProvider
| Inheritance | Yiisoft\ |
|---|---|
| Implements | Yiisoft\ |
Returns a predefined cache control header value regardless of request.
Public Methods
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| DEFAULT_VALUE | 'public, max-age=3600' | Yiisoft\ |
Method Details
| public mixed __construct ( string $value = self::DEFAULT_VALUE ) | ||
| $value | string |
The cache control header value to return. |
public function __construct(
private readonly string $value = self::DEFAULT_VALUE,
) {}
| public ?string get ( \ | ||
| $request | \ |
|
public function get(ServerRequestInterface $request): ?string
{
return $this->value;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.