Skip to content

perf: cache shared icon metadata query functions#110

Merged
charlesrhoward merged 1 commit intomainfrom
codex/issue-101-cache-icon-metadata
Feb 21, 2026
Merged

perf: cache shared icon metadata query functions#110
charlesrhoward merged 1 commit intomainfrom
codex/issue-101-cache-icon-metadata

Conversation

@charlesrhoward
Copy link
Contributor

@charlesrhoward charlesrhoward commented Feb 21, 2026

Summary

  • added unstable_cache wrappers for icon metadata queries
  • cached getTotalIconCount, getIconCountBySource, and getCategories with 15m revalidation
  • kept existing function signatures and call sites intact

Validation

  • pnpm lint
  • pnpm build

Closes #101


Note

Low Risk
Low risk performance change: preserves public query function signatures and only adds server-side caching with a 15-minute TTL; main risk is temporary staleness of counts/categories until revalidation.

Overview
Adds unstable_cache around shared icon metadata queries in src/lib/queries.ts to reduce repeated DB reads.

getTotalIconCount, getIconCountBySource, and getCategories now delegate to cached wrappers keyed by versioned cache keys, with revalidate: 15m and tags: ["icon-metadata"], while keeping existing call sites and return shapes unchanged.

Written by Cursor Bugbot for commit e4ba082. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Feb 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
unicon Ready Ready Preview, Comment Feb 21, 2026 10:25pm

Request Review

@charlesrhoward charlesrhoward force-pushed the codex/issue-101-cache-icon-metadata branch from 4a06e45 to e4ba082 Compare February 21, 2026 22:24
@charlesrhoward charlesrhoward merged commit aadd528 into main Feb 21, 2026
7 checks passed
@charlesrhoward charlesrhoward deleted the codex/issue-101-cache-icon-metadata branch February 21, 2026 22:27
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.

perf: add caching for shared icon metadata queries

1 participant