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

Probably superfluous database query upon banUrlsRegExp requests #664

Closed
virtuaris opened this issue Apr 8, 2019 · 1 comment
Closed

Comments

@virtuaris
Copy link

Hi Dmitry,

is there any technical reason why in UrlEncoder::executeEncoder() when encoding a URL, which contains a pattern provided in banUrlsRegExp, the cache table is checked for that URL ($this->fetchFromUrlCache()) though it's determined that the URL will never be stored in the cache since $this->canCacheUrl() will return false?
Seems to me that $this->fetchFromUrlCache() triggers an unnecessary database lookup in that case but maybe i don't see the bigger picture?

Bests

Harald

@dmitryd
Copy link
Owner

dmitryd commented Nov 14, 2019

@virtuaris

If data can be fetched from the cache, it is used without checking for banUrlsRegExp because it is faster. Usually it is justified because typically there are many more requests to urls that are not banned.

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

No branches or pull requests

2 participants