Skip to content

Get Africoders on your phone

Challenge Explore
Abdulfatai

@abdulfatai

journal

⚡ What is Caching?

1 reply 2 views

What is Caching? Why should your application query the database every single time for data that rarely changes? That's where caching comes in. Caching means temporarily storing frequently used data so it can be accessed faster. Without caching: User → API → Database → Response Every request hits the database. With caching: User → API → Cache → Response If the data is already in the cache, the application can return it without querying the database again. Example Imagine your application has a list of popular products. Instead of repeatedly asking PostgreSQL for the same products, you could store them temporarily in Redis. Benefits Faster responses Fewer database queries Better performance under load Remember Caching = keeping frequently needed data somewhere faster to access.
View passport
Reply

Replies

1 reply

Sign in to reply.