Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

APPLE199's avatar

Laravel Caching - File vs Database?

What is better for caching? File or database? Caching in database seems to do a query to get the database from database everytime it is requested which may slow down the site.

Caching in file does not seem to do that. I don't want to use redis but I have never used memcached so I don't know how that works.

Really, I don't think memcached would work for other people in shared hosting.

So yeah, what is better? Caching via file or db?

0 likes
0 replies

Please or to participate in this conversation.