You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree. In fact, caching will likely be slower than simply re-parsing the UA on each request. A warmed-up parser takes microseconds to parse the UA. See below:
No reason to put this extra burden on your cache server when it doesn't help you at all.
Caching the results seems unnecessary https://github.com/selwin/django-user_agents/blob/master/django_user_agents/utils.py#L41, since
uap-python
doesn't actually load the yamls anymore, but they are converted to python in the build process.See here https://github.com/ua-parser/uap-python/blob/master/setup.py#L20 and here https://github.com/ua-parser/uap-python/blob/master/ua_parser/user_agent_parser.py#L548.
So this is loaded and imported once and then cached by the python importing system anyways.
The text was updated successfully, but these errors were encountered: