Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching to fallback routes #228

Merged
merged 5 commits into from
Jun 8, 2023

Conversation

indykoning
Copy link
Member

By caching fallback routes per url we can greatly reduce the response time in case of heavy controllers, like requests to external services (e.g. strapi)

Here's an example how the timeline is currently in the fallback controllers if the page is available in a later controller
image

Once a url has had it's controller cached the timeline looks like this
image

This could be further optimised by caching the response to this url to prevent the external call in the first place.
But this is the responsibility of the controller making that external call.

Customisation to the cache duration can be done via the rapidez.fallback_routes.cache_duration config key.

config/rapidez.php Outdated Show resolved Hide resolved
@royduin
Copy link
Member

royduin commented Jun 7, 2023

I'll merge when the PR for is master is ready 🚀

@royduin royduin merged commit d0dc851 into rapidez:0.x Jun 8, 2023
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.

2 participants