summaryrefslogtreecommitdiff
path: root/vendor/doctrine/orm/src/Mapping/Cache.php
blob: 3161ab3a545d371c34bb37ce9778f9ad5fa605ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

declare(strict_types=1);

namespace Doctrine\ORM\Mapping;

use Attribute;

/** Caching to an entity or a collection. */
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_PROPERTY)]
final class Cache implements MappingAttribute
{
    /** @psalm-param 'READ_ONLY'|'NONSTRICT_READ_WRITE'|'READ_WRITE' $usage */
    public function __construct(
        public readonly string $usage = 'READ_ONLY',
        public readonly string|null $region = null,
    ) {
    }
}