public repo
URL Shortener
Solo
REST API that shortens URLs, tracks click counts, and caches hot redirects in Redis. Submitting the same URL twice returns the same code — no duplicates.
- Redis cache on the redirect path — cold misses fall back to PostgreSQL and warm the cache
- Idempotent shortening: same URL in → same code out
- Atomic click counter via UPDATE ... SET click_count = click_count + 1
- Unit tests with Mockito covering cache hit, cache miss, and not-found paths