How is cache size to be understood ?
lumpidu opened this issue · comments
In the example configuration cacheSize: 15
or cacheSize: 25
is stated, but I don't understand, what this number means:
Does it mean that geoblock caches only 15 or 25 IP addresses before updating the cache and reaching out to GeoJs.io ? This number would then be rather low and should be more like a few hundreds or thousands, right ?
Or does it mean, that it uses 15/25 x (some discrete size number) of memory for caching IP addresses ?
Hi @lumpidu
Yes you are right, the cache size means, that geoblock will remember the last x (e.g. 15) IP addresses. If a new x + 1 (e.g. 16th) address tries to connect, the oldest of the x (e.g. 15) addresses is ejected and GeoJs.io is contacted for the new IP.
Depending on the traffic your site will have, the number should be higher or lower. Since I host only some services at home for me and my family, my number is not very high.