DevCraft Документации
EnglishReferenceClasses

PersistenceEngine v1.0.0

Local storage engine: PSR-6 cache first, ORM optional.

Description: Local storage engine: PSR-6 cache first, ORM optional.

Namespace: DevCraftClub\MyShows\Persistence

Since: 1.0.0

Methods

__construct(PersistenceStoreInterface $primary, CacheKeyGenerator $keyGenerator, ?PersistenceStoreInterface $orm = null): void

ParameterTypeDescription
$primaryPersistenceStoreInterface—
$keyGeneratorCacheKeyGenerator—
$ormPersistenceStoreInterface— Default: null.

Returns: void

find(string $type, int|string $id, callable $fetcher, ?bool $forceRecheck = null): array

Description: Find an object in local storage or load it through $fetcher.

ParameterTypeDescription
$typestring—
$idintstring
$fetchercallable—
$forceRecheck?bool— Default: null.

Returns: array

invalidate(string $type, int|string $id): void

ParameterTypeDescription
$typestring—
$idintstring

Returns: void

На этой странице