Skip to content

docs(checkpoint): complete checkpoint 22 and practices - Redis, Databases and Caching Foundations - #33

Merged
wendev27 merged 1 commit into
mainfrom
checkpoint-22-databases-redis-and-caching-foundations
Jul 18, 2026
Merged

docs(checkpoint): complete checkpoint 22 and practices - Redis, Databases and Caching Foundations#33
wendev27 merged 1 commit into
mainfrom
checkpoint-22-databases-redis-and-caching-foundations

Conversation

@wendev27

Copy link
Copy Markdown
Owner

Summary

What changed in this checkpoint?

  • Ran PostgreSQL inside Docker and explored CRUD operations.
  • Learned how Docker volumes keep database data persistent even after containers are removed.
  • Studied database migrations conceptually and connected them to frameworks like Laravel.
  • Created and inspected database backups using pg_dump.
  • Deployed Redis in Docker and experimented with its core commands and data structures.
  • Built a mental model of how caching reduces database load and improves performance.

What went wrong

What problems, bugs, or misunderstandings happened?

  • Initially assumed Redis automatically communicates with the database.
  • Confused database persistence with container persistence.
  • Underestimated the importance of backups, thinking Docker volumes alone were enough.
  • Needed time to understand the difference between PostgreSQL as the source of truth and Redis as a cache layer.

What surprised me

What behavior or concept did I not expect?

  • Deleting a container does not necessarily delete the database because the data lives inside Docker volumes.
  • Redis stores data entirely in memory, making it dramatically faster than traditional databases.
  • Database migrations are essentially version control for schemas.
  • Many framework features, such as sessions and expiration systems, are powered by Redis behind the scenes.

How I fixed it

How did I solve the problem?

  • Broke down the request flow between the user, backend, Redis, and PostgreSQL.
  • Compared Docker containers and volumes to understand persistence.
  • Explored backup and restore commands to understand disaster recovery.
  • Practiced Redis commands and visualized the cache-hit and cache-miss process.

What I would do differently

If I repeated this checkpoint, what would I improve?

  • Create migration files manually earlier in the checkpoint.
  • Experiment with restoring a backup into a fresh database.
  • Build a small application that uses Redis caching in practice.
  • Spend more time visualizing the relationship between the backend, database, and cache.

Lessons learned

What important ideas will I carry into the next checkpoint?

  • PostgreSQL is the source of truth, while Redis is a performance optimization layer.
  • Docker volumes are responsible for persistence, not containers.
  • Backups remain essential even when using volumes.
  • Database migrations help applications evolve safely over time.
  • Caching avoids repeating expensive database operations.
  • Many "magic" framework features are abstractions built on top of databases, caching systems, and infrastructure.

@wendev27

Copy link
Copy Markdown
Owner Author
image

Strings and Counters
image

Lists
image

Hashes
image

@wendev27
wendev27 merged commit 5ae6f35 into main Jul 18, 2026
6 checks passed
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.

1 participant