Skip to content

Commit fe53bef

Browse files
feat(cache): Require a minimum of 1 second for cache durations
1 parent d6f99c1 commit fe53bef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ public function getConfigTreeBuilder(): TreeBuilder
6969
->scalarNode('redis_dsn')->end()
7070
->scalarNode('memcached_dsn')->end()
7171
->integerNode('clean_ip_cache_duration')
72-
->defaultValue(Constants::CACHE_EXPIRATION_FOR_CLEAN_IP)
72+
->min(1)->defaultValue(Constants::CACHE_EXPIRATION_FOR_CLEAN_IP)
7373
->end()
7474
->integerNode('bad_ip_cache_duration')
75-
->defaultValue(Constants::CACHE_EXPIRATION_FOR_BAD_IP)
75+
->min(1)->defaultValue(Constants::CACHE_EXPIRATION_FOR_BAD_IP)
7676
->end()
7777
// Geolocation
7878
->arrayNode('geolocation')

0 commit comments

Comments
 (0)