fix(#131): invalidate cache when updating recipe markup

This commit is contained in:
Benjamin Nussbaum 2025-12-29 22:24:32 +01:00
parent e6d66af298
commit a5cb38421e
2 changed files with 31 additions and 0 deletions

View file

@ -55,6 +55,13 @@ class Plugin extends Model
$model->uuid = Str::uuid();
}
});
static::updating(function ($model): void {
// Reset image cache when markup changes
if ($model->isDirty('render_markup')) {
$model->current_image = null;
}
});
}
public function user()