You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: invalidate Redis cache on link/pixel update + delete
Address Greptile review feedback on umami-software#4245.
- deleteLink and deletePixel now redis.client.del('link:slug' / 'pixel:slug')
using the slug returned by Prisma's delete(). Previously the row was hard-
deleted but the Redis cache (24h TTL) kept serving the slug, so /q/<slug>
and /p/<slug> kept firing for up to a day after deletion.
- updateLink and updatePixel now invalidate the cache for the current slug,
and additionally for the previous slug if the slug was changed. Previously
changing a link's destination URL or slug left the public cache stale.
- Cloud-mode link.updateMany and pixel.updateMany in deleteUser now spread
ownedFilter (which is { userId } in cloud mode) instead of hardcoding
{ userId }, so the cleanup intent stays consistent if ownedFilter ever
evolves.
Verified empirically against a Docker Postgres + Redis: deleted link's
/q/<slug> returns 404 immediately (was: still redirected to old URL for 24h);
slug rename invalidates both old and new cache keys.
0 commit comments