Skip to content

Conversation

@mruac
Copy link
Contributor

@mruac mruac commented Aug 11, 2025

PR implements a cache on the user handle to DID resolution for up to a week to prevent the resolution being performed each time the feed is generated. Could be permanent, but I don't like it sitting around in the cache permanently. Also added to user profiles (custom name, avatar and description) to the cache for up to the defaulted day.

In the future, I would like the bridge to resolve the user handle to its DID and redirect to itself with the DID as the user_id if a handle is provided (handles can be changed, DIDs cannot), and in turn automatically correct any currently subscribed feed urls that is using the user handle as the user_id parameter. This will require implementing a HTTP 301 redirect. Please see #4663 for a discussion on this.

Also added more semantics.

@github-actions
Copy link

github-actions bot commented Aug 11, 2025

Pull request artifacts

Bridge Context Status
Bluesky 1 untitled (current) ✔️
Bluesky 1 untitled (pr) ✔️

last change: Wednesday 2025-10-29 21:40:33

@dvikan
Copy link
Contributor

dvikan commented Sep 12, 2025

bridges have access to cache like this: $this->cache->get('hello')

i'd prefer we deprecate $this->loadCacheValue (which is simply a convenience wrapper)

@Mynacol Mynacol force-pushed the 20250810-bluesky-httpcache branch from 3a7a056 to 9f4ba75 Compare October 29, 2025 21:39
@Mynacol
Copy link
Contributor

Mynacol commented Oct 29, 2025

I rebased this and changed it to use the new cache functions.
LGTM now.

@Mynacol Mynacol requested a review from dvikan October 29, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants