Open jonasraoni opened 3 years ago
I think the cache should be dependent on the Site's minPasswordLength
setting. If the setting changes, the cache is invalid and needs to be recreated.
Yep, I've added a local check here, but I think it should be done through a hook.
Since the cache is discarding smaller passwords, we need to monitor changes in this setting (or inflate the cache with small passwords), that could happen outside the plugin.
Still talking about the cache... If we sort the hashes before storing them into the disk, we could use a binary-search instead of using the
opcache
. But I think it's not worth, unless the file is huge :D