1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 00:05:29 +00:00

Improve cache invalidation after processing VideoThumbnail to eliminate "No Preview Available" on grid feeds

This commit is contained in:
Daniel Supernault 2022-08-03 22:34:04 -06:00
parent 247c9ec5f8
commit 47571887fe
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -14,6 +14,8 @@ use Storage;
use App\Media;
use App\Jobs\MediaPipeline\MediaStoragePipeline;
use App\Util\Media\Blurhash;
use App\Services\MediaService;
use App\Services\StatusService;
class VideoThumbnail implements ShouldQueue
{
@ -72,6 +74,11 @@ class VideoThumbnail implements ShouldQueue
if($media->status_id) {
Cache::forget('status:transformer:media:attachments:' . $media->status_id);
MediaService::del($media->status_id);
Cache::forget('status:thumb:nsfw0' . $media->status_id);
Cache::forget('status:thumb:nsfw1' . $media->status_id);
Cache::forget('pf:services:sh:id:' . $media->status_id);
StatusService::del($media->status_id);
}
MediaStoragePipeline::dispatch($media);