Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
/*
4
 * This file is part of the Symfony package.
5
 *
6
 * (c) Fabien Potencier <fabien@symfony.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
 
12
namespace Symfony\Component\HttpKernel\Attribute;
13
 
14
/**
15
 * Describes the default HTTP cache headers on controllers.
16
 *
17
 * @author Fabien Potencier <fabien@symfony.com>
18
 */
19
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_METHOD | \Attribute::TARGET_FUNCTION)]
20
final class Cache
21
{
22
    public function __construct(
23
        /**
24
         * The expiration date as a valid date for the strtotime() function.
25
         */
26
        public ?string $expires = null,
27
 
28
        /**
29
         * The number of seconds that the response is considered fresh by a private
30
         * cache like a web browser.
31
         */
32
        public int|string|null $maxage = null,
33
 
34
        /**
35
         * The number of seconds that the response is considered fresh by a public
36
         * cache like a reverse proxy cache.
37
         */
38
        public int|string|null $smaxage = null,
39
 
40
        /**
41
         * Whether the response is public or not.
42
         */
43
        public ?bool $public = null,
44
 
45
        /**
46
         * Whether or not the response must be revalidated.
47
         */
48
        public bool $mustRevalidate = false,
49
 
50
        /**
51
         * Additional "Vary:"-headers.
52
         */
53
        public array $vary = [],
54
 
55
        /**
56
         * An expression to compute the Last-Modified HTTP header.
57
         */
58
        public ?string $lastModified = null,
59
 
60
        /**
61
         * An expression to compute the ETag HTTP header.
62
         */
63
        public ?string $etag = null,
64
 
65
        /**
66
         * max-stale Cache-Control header
67
         * It can be expressed in seconds or with a relative time format (1 day, 2 weeks, ...).
68
         */
69
        public int|string|null $maxStale = null,
70
 
71
        /**
72
         * stale-while-revalidate Cache-Control header
73
         * It can be expressed in seconds or with a relative time format (1 day, 2 weeks, ...).
74
         */
75
        public int|string|null $staleWhileRevalidate = null,
76
 
77
        /**
78
         * stale-if-error Cache-Control header
79
         * It can be expressed in seconds or with a relative time format (1 day, 2 weeks, ...).
80
         */
81
        public int|string|null $staleIfError = null,
82
    ) {
83
    }
84
}