
Learn SQL with me. Made by @csaba_kissi
Joined November 2023
- Tweets356
- Following8
- Followers366
- Likes1.1K
Good to know how caching strategies work
Caching Strategies Explained ⚡🗄️
Caching speeds up applications by reducing expensive database queries and repeated computations.
But not all caching strategies work the same way.
Here are 8 important concepts 👇
🔵 1. Cache-Aside - App checks the cache first, fetches missing data from the database, and stores the result.
🟠 2. Read-Through - The cache automatically loads missing data from the database.
🔵 3. Write-Through - Writes update the cache and database before being acknowledged.
🟠 4. Write-Behind - Writes go to the cache first and are persisted asynchronously.
🔵 5. Refresh-Ahead - Frequently accessed entries are refreshed before they expire.
🟠 6. Stale-While-Revalidate - Serve cached data immediately while refreshing it in the background.
🔵 7. Time-to-Live (TTL) - Automatically expire cached entries after a defined period.
🟠 8. Least Recently Used (LRU) - Evict the least recently accessed entries when the cache fills up.
Why caching matters:
⚡ Faster response times
📉 Reduced database load
📈 Better scalability
💰 Lower infrastructure costs
💡 The biggest challenge isn't storing data in a cache. It's keeping that data fresh, consistent, and available when needed.
Choose your strategy based on read/write patterns, freshness requirements, and acceptable trade-offs. 🚀
18
This is how the deployment flow should look like
CI/CD environment flow, explained clearly ⚙️🚀
Software usually doesn’t go straight from code to users. It moves through a series of environments first 👇
🔹 Development
Where features are built, tested locally, and improved fast.
🔹 Testing
Where CI runs automated checks to catch bugs early.
🔹 Staging
A production-like space for final validation and review.
🔹 Production
The live environment used by real customers.
Why does this matter? 🛡️
It lowers risk, improves quality, and makes releases afer.
Teams can validate changes step by step instead of guessing.
Typical path:
Code change → testing → staging → production
A simple flow, but one of the biggest reasons modern teams ship reliably 📦
1
32
Anti-AI-slop looks cool
nutrient.io - AI document editing with auditable changes
ponytail.dev - your AI coding agent writes the least code that works
github.com/Nutlope/hallmark - Anti-AI-slop design skill for Claude, Codex
motion-primitives.com - reusable animated components
cta.gallery - CTA design inspiration
1
1
327
SqlZap retweeted
clianything.cc - Generate a CLI app for AI agents from any program
sevalla.com - Deploy apps without managing infrastructure
kaneo.app - Open-source self-hosted Linear/Jira alternative
reacher.email - Open-source email address checker
getlayers.ai - Cinematic AI sites for design inspiration
Both MySQL and Postgres are great databases.
Backend development is more than building APIs. ⚙️
A simple roadmap:
1️⃣ Learn one language well
2️⃣ Master Git + terminal
3️⃣ Understand HTTP + REST
4️⃣ Pick a backend framework
5️⃣ Learn SQL + databases
6️⃣ Design clean APIs
7️⃣ Add auth + security 🔐
8️⃣ Use caching + queues
9️⃣ Write tests 🧪
🔟 Deploy, monitor, improve 🚀
Core skills:
💻 Code
🗄️ Data
🔌 APIs
🔐 Security
📈 Scalability
📊 Observability
Build real projects as you learn.
A strong backend developer understands code + data + APIs + security + production.
1
57
DB Indexes are very important.
Don't underestimate them.
SQL indexes are one of the simplest ways to make database queries faster. ⚡ (before you start scaling vertically or horizontally)
Think of an index like the index at the back of a book:
📖 Without an index:
Search → scan rows one by one → find the match
🐢 Gets slower as your table grows
🚀 With an index:
Search → check the index → jump directly to matching rows
⚡ Much faster lookups
Indexes can help with:
🔎 Faster SELECT queries
📈 Better query performance
💾 Fewer unnecessary disk reads
⚡ Faster filtering and lookups
Common index types include:
🔑 Primary index - identifies each row
🛡️ Unique index - prevents duplicate values
📚 Clustered index - controls how data is physically organized
📑 Non-clustered index - keeps a separate lookup structure
1
1
285
SqlZap retweeted
10 solid platforms worth checking out for deploying apps, APIs, workers, and databases:
• Sevalla
• Cloudflare Workers
• Fly․io
• Vercel
• Netlify
• Firebase App Hosting
• Heroku
• DigitalOcean App Platform
• Render
• Railway
Which DB type do you prefer?
SQL and NoSQL databases are both essential - but they are built for different kinds of problems. 🗄️⚡
SQL databases are relational.
They store structured data in tables with rows and columns.
Think:
👤 users
🛒 orders
💳 payments
📊 reports
They usually come with:
🔹 predefined schemas
🔹 SQL queries
🔹 joins and relationships
🔹 strong consistency
🔹 transaction support
Common SQL databases:
🐘 PostgreSQL
🐬 MySQL
📦 SQLite
🗂️ MariaDB
SQL is usually the better choice when:
✅ your data has clear relationships
✅ consistency matters a lot
✅ you need complex queries and reporting
✅ you are building systems like banking, ERP, CRM, or order management
NoSQL databases are non-relational.
They store data in more flexible formats such as:
📄 documents
🔑 key-value pairs
🧱 wide-column structures
🕸️ graphs
Common NoSQL databases:
🍃 MongoDB
⚡ Redis
📡 Cassandra
☁️ DynamoDB
NoSQL is often better when:
✅ data structure changes often
✅ you need high throughput
✅ you want to scale horizontally
✅ you are building content feeds, caching layers, real-time apps, or IoT systems
A simple mental model:
🟦 SQL = structured + relational
🟧 NoSQL = flexible + scalable
Use SQL when relationships, transactions, and data integrity matter.
Use NoSQL when flexibility, speed, or large-scale distribution matter most. 🚀
1
40
Finally something related to SQL.
Postgres is amazing
Open-source apps for coders
kinetics.colorion.co - Open-source CSS/React motion effects with prompts
zrok.io - open-source secure local sharing/tunnels
scalar.com - modern interactive API docs
beszel.dev - open-source, lightweight server monitoring
pglite.dev - Lightweight Postgres running in WebAssembly.
1
1
257
Who else used Redis for cache?
PostgreSQL and Redis are often used in the same application, but they solve very different problems.⚡
PostgreSQL is a relational database designed for durable, structured data.
It stores information in tables with rows and columns and supports:
🔹 SQL queries
🔹 Relationships and joins
🔹 Constraints
🔹 ACID transactions
🔹 Complex filtering and reporting
Typical PostgreSQL use cases:
👤 User accounts
🛒 Orders and payments
📊 Reports and analytics
🔗 Data with relationships
💾 Long-term business records
Redis, on the other hand, is an in-memory data store optimized for extremely fast access.
It usually stores data as keys and values:
session:123 → active
cart:42 → 3 items
user:7:role → admin
Redis supports structures such as:
🔸 Strings
🔸 Hashes
🔸 Lists
🔸 Sets
🔸 Sorted sets
Typical Redis use cases:
⚡ Caching
🔐 Session storage
⏱️ Rate limiting
🔢 Counters
📨 Queues and pub/sub
🕒 Temporary or frequently accessed data
The key difference:
🗄️ PostgreSQL = durable source of truth
⚡ Redis = fast access and caching layer
A common architecture looks like this:
1️⃣ The app checks Redis
2️⃣ If the data exists, it is returned immediately
3️⃣ If not, the app queries PostgreSQL
4️⃣ The result is stored in Redis for the next request
1
56
Postgres is one of the best databases you can choose.
The JSON support it amazing
A clean SaaS stack for shipping faster:
Hosting without infra management → Sevalla
CDN + WAF → Cloudflare
Domains + DNS → Namecheap
Auth → Auth0
Database → PostgreSQL
Search → Algolia
Payments → Paddle
Error tracking → Sentry
Uptime monitoring → UptimeRobot
CI/CD → CircleCI
2
118











