mirror of https://github.com/pixelfed/pixelfed
Invalidate landing contact cache on user-side admin profile edits
When an admin updates their avatar, bio, or display name via the regular Settings UI (not the admin panel), AvatarOptimize and HomeSettings::homeUpdate previously only invalidated the per-profile caches. The api:v1:instance-data:contact key, which embeds the admin's account object on the landing page and at /api/v(1|2)/instance, remained cached for up to 7 days (also the source of many hours' headaches). AvatarOptimize now also calls AccountService::del() (the underlying pf:services:account:<pid> cache, which had been left stale) and, if the profile backs the configured contact account, LandingCacheService::invalidateContact(). HomeSettings does the contact hit too. The profileBacksContact helper mirrors the resolution order in LandingService::get(): prefer instance.admin.pid when set, else fall back to the first is_admin user.pull/6656/head
parent
19a7f7b128
commit
793d2c3ef3
Loading…
Reference in New Issue