-
Notifications
You must be signed in to change notification settings - Fork 80
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
Persistent connection #36
Comments
I am not sure this would be possible with the pure PHP reader. It might make sense for the extension, but we would need to figure out a reasonable way to provide a mostly compatible API. |
Yes, I was talking about the extension of course. Speaking of API — that could be an optional boolean parameter to |
Most often use case in PHP is to detect a country/city of current request's IP address. In common fpm/fastcgi environment database file is re-opened and re-read on each and every request when
MaxMind\Db\Reader
instance is created. The idea is to keep database file opened as long as php fpm/fastcgi master process is alive. Simple tests show performance gain at least by an order of magnitude.As as side note, database should be reloaded whenever its file size or timestamp has changed.
The text was updated successfully, but these errors were encountered: