getmeli / meli

Platform for deploying static sites and frontend applications easily. Automatic SSL, deploy previews, reverse proxy, and more.
Other
2.41k stars 97 forks source link

Enable caddy option "hash_cache" for password protected pages #222

Closed FloDwld closed 3 years ago

FloDwld commented 3 years ago

Hi! I noticed that enabling password protection for a page increases its load time by a factor of ~10x on my low-specced VPS. The reason seems to be that caddy has to do an expensive hash computation (see the corresponding issue) for every request on the page.

To fix that, they implemented the hash_cache option. I suggest enabling this option for all password protected pages to improve their load time. (There seems to be a tradeoff that passwords stay in memory for longer, but this tradeoff seems more than worth it to me)

Thanks! Florian

pimartin commented 3 years ago

Hi, thank you for the suggestion.

This seems like a good idea, we'll add this soon.

gempain commented 3 years ago

This has been released on next. Should join beta tomorrow.

FloDwld commented 3 years ago

Thanks! I've given it a try on next and it really improves load times for consecutive requests to password protected pages for me.

gempain commented 3 years ago

Glad to know this helped ! It's now been released in beta, so I'll close, but feel free to comment and we'll reopen if needed.