СправочникКлассы
PersistenceEngine v1.0.0
Движок локальной персистентности: PSR-6 кэш первичный, ORM опционально.
Описание: Движок локальной персистентности: PSR-6 кэш первичный, ORM опционально.
Namespace: DevCraftClub\MyShows\Persistence
С версии: 1.0.0
Методы
__construct(PersistenceStoreInterface $primary, CacheKeyGenerator $keyGenerator, ?PersistenceStoreInterface $orm = null): void
| Параметр | Тип | Описание |
|---|---|---|
$primary | PersistenceStoreInterface | — |
$keyGenerator | CacheKeyGenerator | — |
$orm | PersistenceStoreInterface | — По умолчанию: null. |
Возвращает: void
find(string $type, int|string $id, callable $fetcher, ?bool $forceRecheck = null): array
Описание: Найти объект в локальном хранилище или запросить через $fetcher.
| Параметр | Тип | Описание |
|---|---|---|
$type | string | — |
$id | int | string |
$fetcher | callable | — |
$forceRecheck | ?bool | — По умолчанию: null. |
Возвращает: array
invalidate(string $type, int|string $id): void
| Параметр | Тип | Описание |
|---|---|---|
$type | string | — |
$id | int | string |
Возвращает: void