notjuliet / pdsls

Browse AtProto repositories
https://pdsls.dev/
BSD Zero Clause License
50 stars 3 forks source link

DID lookup caching #1

Closed DavidBuchanan314 closed 2 weeks ago

DavidBuchanan314 commented 2 weeks ago

plc.directory does not currently set a Cache-Control header, which means that when navigating around a repo, the browser fires off a fresh request with every click (which takes about 100ms from where I am).

I added a simple cache, which makes navigation more snappy. The cache is just a regular JS variable so it doesn't persist beyond a page reload, but I think this is a feature not a bug.