Support the ongoing development of Laravel.io →
posted 2 years ago
Last updated 2 years ago.
0
moderator

A refresh is a new request, your server doesn't see a difference.

If you have parts that are called a lot but didn't change much it is possible to cache them.

Personally I should first check if there are improvements in the code before caching because that can result in other problems.

But for some parts a cache is a valid option.

Example:
For this site are the top members and moderators cached for 30 minutes. That is data that isn't changed much and isn't a problem if it isn't updated in realtime. But it is displayed on a lot of requests.
See: https://github.com/laravelio/laravel.io/blob/main/app/Http/Controllers/Forum/ThreadsController.php#L59-L64=

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.