antonioribeiro / firewall

Firewall package for Laravel applications
BSD 3-Clause "New" or "Revised" License
1.39k stars 163 forks source link

possible duplicate cache value #100

Closed meyer59 closed 7 years ago

meyer59 commented 7 years ago

Hi What is the difference in these two cache value in the config/firewall.php file ? https://github.com/antonioribeiro/firewall/blob/c33b9e593e02c6d80e776abd85a45b69d18c87ac/src/config/config.php#L72 https://github.com/antonioribeiro/firewall/blob/c33b9e593e02c6d80e776abd85a45b69d18c87ac/src/config/config.php#L80

antonioribeiro commented 7 years ago

First one is general IP cache, when someone searches for an IP address, it caches that search for some time. Finding an IP address contained in a CIDR range (172.17.0.0/24, for instance) can be a "slow", caching it improves performance.

Second one is list cache. Sometimes a database list can take some time to load and process, caching it, if you are not making frequent changes to your lists, may improve firewall speed a lot.

meyer59 commented 7 years ago

Got it. I will add those comments to my config/firewall.php. Thank you

antonioribeiro commented 7 years ago

Will add to the package config too, thank you.