-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(ip-restriction) faster iputils checking
Using the binary representation of the address (e.g. via ngx.var.binary_remote_addr) is a more efficient approach, as we no longer need to rely on a small LRU cache to store binary- parsed CIDR and IP objects. To achieve this, we rely on a read-through module-level cache of parsed CIDR objects to call iputils.binip_in_cidrs directly; parsed CIDRs objects by definition are consistent, so we needn't worry about cache invalidation here.
- Loading branch information
Showing
1 changed file
with
47 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters