-
Notifications
You must be signed in to change notification settings - Fork 437
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
No Limit on Cache Size #922
Comments
@tehryanx thank you for opening this issue! I'm surprised that this is possible. The Recently, the original implementation has been split into a new @afcapel @kevinmcconnell since you two have recently implemented the new caching mechanisms, this is definitely worth investigating further. |
@seanpdoyle I don't think this issue is related to the disk cache additions, since it predates the PR being merged. The normal Turbo cache is an in memory cache, so preloading a very big page will load it into memory. That's the expected behaviour. You can fix this removing the preloading or opting out of caching. Agreed that now that we have a disk cache it'd be interesting to explore if we can limit the cache byte size, instead of limiting the number entries, but I suspect it will be a bit difficult to nail down in a general way. |
@afcapel that makes a lot of sense.
I'm sorry, I didn't mean to imply that you had introduced it, only that your fresh context on that area of the codebase might help to inform a solution. |
Using
data-turbo-preload
, it's possible to overload the cache and make the browser unstable. This turns a simple link injection bug into a full browser DOS. Below are screenshots where I've loaded a 30mb and a 50mb file into cache using nothing but a link tag. Note how the memory footprint balloons.Providing a configuration option to limit the size of the cache could mitigate this.
The text was updated successfully, but these errors were encountered: