mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-23 08:14:10 +00:00
Improve cache invalidation after processing VideoThumbnail to eliminate "No Preview Available" on grid feeds
This commit is contained in:
parent
247c9ec5f8
commit
47571887fe
1 changed files with 7 additions and 0 deletions
|
@ -14,6 +14,8 @@ use Storage;
|
||||||
use App\Media;
|
use App\Media;
|
||||||
use App\Jobs\MediaPipeline\MediaStoragePipeline;
|
use App\Jobs\MediaPipeline\MediaStoragePipeline;
|
||||||
use App\Util\Media\Blurhash;
|
use App\Util\Media\Blurhash;
|
||||||
|
use App\Services\MediaService;
|
||||||
|
use App\Services\StatusService;
|
||||||
|
|
||||||
class VideoThumbnail implements ShouldQueue
|
class VideoThumbnail implements ShouldQueue
|
||||||
{
|
{
|
||||||
|
@ -72,6 +74,11 @@ class VideoThumbnail implements ShouldQueue
|
||||||
|
|
||||||
if($media->status_id) {
|
if($media->status_id) {
|
||||||
Cache::forget('status:transformer:media:attachments:' . $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);
|
MediaStoragePipeline::dispatch($media);
|
||||||
|
|
Loading…
Reference in a new issue