MAX_DOWNLOAD_SIZE
MAX_DOWNLOAD_SIZE =3145728
Create a filesystem cache for your image preview / thumbnails.
__construct(string $absolutePath,string $prefixUrl,integer $invalidateSeconds)
C'tor.
string | $absolutePath | Needs to end with |
string | $prefixUrl | Needs to end with |
integer | $invalidateSeconds |
Absolute path is not writable or does not exist
get(array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> $thumbnails)
Take an URL which needs to be checked if it has cached a thumbnail and set data accordingly:
If there was an error with the file downloading previously, setError
for the Thumbnail
.
array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> | $thumbnails | Key is the embed URL |
set(array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> $thumbnails)
See `ImagePreviewCache`.
Additionally, persist all found thumbnails to the database so we can e.g. reuse for List of consents.
array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> | $thumbnails | Key is the embed URL |
allowance(array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> $thumbnails)
See `ImagePreviewCache`.
array<mixed,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail> | $thumbnails | Key is the embed URL |
setBySingleResult(array $handle,\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail $thumbnail)
Single process a result within `$this::set()`.
array | $handle | |
\DevOwl\HeadlessContentBlocker\plugins\imagePreview\Thumbnail | $thumbnail |