Today I Learned

A collection of quick learnings, insights, and “aha” moments. Think of this as my digital garden - a space for growing ideas that might not be fully-formed blog posts yet, but are worth sharing.

code

Next.js 14 App Router Caching

The App Router has multiple caching layers: Router Cache (client), Full Route Cache (server), Request Memoization, and Data Cache. Understanding when each layer kicks in is crucial for performance.

#nextjs#performance
ai

OpenAI Embedding Dimensions

text-embedding-ada-002 creates 1536-dimensional vectors. You can reduce dimensions using PCA for faster similarity search, but you lose some semantic precision. Trade-off is usually worth it above 10k documents.

#ai#embeddings#optimization
code

Service Worker Caching Strategies

Network-first is great for dynamic content with offline fallback. Cache-first is better for static assets. Stale-while-revalidate gives instant response while updating cache in background - perfect for blogs.

#pwa#caching

Let's Create Something Amazing Together

Whether you have a project in mind or just want to chat, I'm always open to discussing new opportunities and ideas.