mirror of
https://github.com/jez500/pricebuddy.git
synced 2026-11-24 19:58:13 +01:00
- Remove once() from ProductInsights::for(): the static call-site memoized globally, so resolving insights for a second product in one request returned the first product's data. The persistent insights_cache already prevents recompute, so once() only added the bug. - ProductTransformer delegates to ProductInsights::for() instead of duplicating the cache-vs-compute branch. - RetryUrlPriceJob rebuilds price/insights caches only on a non-null scrape result; a failed retry changes no data, so skip the heavy rebuild. - NotifyPriceChangeListener: add $tries/$timeout for the queued rebuild. - Product::updateInsightsCache() uses forceFill()->saveQuietly() so a pure cache write doesn't re-trigger the saving hook (next_check_at) or updated hook. - Add regression test: for() returns distinct insights per product in one request.