Skip to content

Fix: cache the Unsplash wallpaper photo on the server - #504

Merged
SandObserver merged 1 commit into
mainfrom
fix/wallpaper-server-cache
Oct 19, 2026
Merged

SandObserver merged 1 commit into
mainfrom
fix/wallpaper-server-cache

Conversation

@SandObserver

Copy link
Copy Markdown
Owner

Summary

  • Cache the Unsplash photo URL for 24 hours, keyed on API key and collection, and share one in-flight request.
  • Return a fixed No image returned error and log the upstream status instead of returning Unsplash's error text.

Testing
All green. Added 4 tests for the cache, request sharing and error mapping.

Changelog

Changed

  • The Unsplash wallpaper changes once a day instead of on every load.

Security

  • The wallpaper endpoint no longer returns Unsplash's error text.

Checklist

  • Stays within the project constraints: one container, no runtime dependencies, no build step (see CONTRIBUTING.md).
  • Tests added or updated for new logic, and the full suite, lint, and typechecks pass.
  • Docs updated if behavior or configuration changed.

Keep the chosen photo for 24 hours per key and collection, share one in-flight request, and replace Unsplash's error text with a fixed message.
@SandObserver SandObserver added the bug Something isn't working label Oct 19, 2026
@SandObserver
SandObserver merged commit feecc17 into main Oct 19, 2026
6 checks passed
@SandObserver
SandObserver deleted the fix/wallpaper-server-cache branch October 19, 2026 02:28
stackyard-release Bot pushed a commit that referenced this pull request Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant