Optimize Redis pool ping parameters
This commit is contained in:
		
							parent
							
								
									6676591256
								
							
						
					
					
						commit
						c24b44b762
					
				@ -742,9 +742,9 @@ redis:
 | 
				
			|||||||
    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
					    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
				
			||||||
    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
					    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
				
			||||||
    # Enable/Disable PING command sent when a connection is borrowed
 | 
					    # Enable/Disable PING command sent when a connection is borrowed
 | 
				
			||||||
    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
 | 
					    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
 | 
				
			||||||
    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
					    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
				
			||||||
    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
 | 
					    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
 | 
				
			||||||
    # The property is used in the context of connection pooling in Redis
 | 
					    # The property is used in the context of connection pooling in Redis
 | 
				
			||||||
    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
					    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
				
			||||||
    # Minimum time that an idle connection should be idle before it can be evicted from the connection pool. The value is set in milliseconds
 | 
					    # Minimum time that an idle connection should be idle before it can be evicted from the connection pool. The value is set in milliseconds
 | 
				
			||||||
 | 
				
			|||||||
@ -79,10 +79,10 @@ public abstract class TBRedisCacheConfiguration {
 | 
				
			|||||||
    @Value("${redis.pool_config.minIdle:16}")
 | 
					    @Value("${redis.pool_config.minIdle:16}")
 | 
				
			||||||
    private int minIdle;
 | 
					    private int minIdle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Value("${redis.pool_config.testOnBorrow:true}")
 | 
					    @Value("${redis.pool_config.testOnBorrow:false}")
 | 
				
			||||||
    private boolean testOnBorrow;
 | 
					    private boolean testOnBorrow;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Value("${redis.pool_config.testOnReturn:true}")
 | 
					    @Value("${redis.pool_config.testOnReturn:false}")
 | 
				
			||||||
    private boolean testOnReturn;
 | 
					    private boolean testOnReturn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Value("${redis.pool_config.testWhileIdle:true}")
 | 
					    @Value("${redis.pool_config.testWhileIdle:true}")
 | 
				
			||||||
 | 
				
			|||||||
@ -114,9 +114,9 @@ redis:
 | 
				
			|||||||
    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
					    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
				
			||||||
    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
					    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
				
			||||||
    # Enable/Disable PING command send when a connection is borrowed
 | 
					    # Enable/Disable PING command send when a connection is borrowed
 | 
				
			||||||
    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
 | 
					    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
 | 
				
			||||||
    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
					    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
				
			||||||
    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
 | 
					    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
 | 
				
			||||||
    # The property is used in the context of connection pooling in Redis
 | 
					    # The property is used in the context of connection pooling in Redis
 | 
				
			||||||
    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
					    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
				
			||||||
    # Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds
 | 
					    # Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds
 | 
				
			||||||
 | 
				
			|||||||
@ -147,9 +147,9 @@ redis:
 | 
				
			|||||||
    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
					    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
				
			||||||
    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
					    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
				
			||||||
    # Enable/Disable PING command send when a connection is borrowed
 | 
					    # Enable/Disable PING command send when a connection is borrowed
 | 
				
			||||||
    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
 | 
					    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
 | 
				
			||||||
    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
					    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
				
			||||||
    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
 | 
					    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
 | 
				
			||||||
    # The property is used in the context of connection pooling in Redis
 | 
					    # The property is used in the context of connection pooling in Redis
 | 
				
			||||||
    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
					    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
				
			||||||
    # Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds
 | 
					    # Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds
 | 
				
			||||||
 | 
				
			|||||||
@ -114,9 +114,9 @@ redis:
 | 
				
			|||||||
    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
					    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
				
			||||||
    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
					    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
				
			||||||
    # Enable/Disable PING command send when a connection is borrowed
 | 
					    # Enable/Disable PING command send when a connection is borrowed
 | 
				
			||||||
    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
 | 
					    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
 | 
				
			||||||
    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
					    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
				
			||||||
    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
 | 
					    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
 | 
				
			||||||
    # The property is used in the context of connection pooling in Redis
 | 
					    # The property is used in the context of connection pooling in Redis
 | 
				
			||||||
    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
					    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
				
			||||||
    # Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds
 | 
					    # Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds
 | 
				
			||||||
 | 
				
			|||||||
@ -115,9 +115,9 @@ redis:
 | 
				
			|||||||
    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
					    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
				
			||||||
    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
					    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
				
			||||||
    # Enable/Disable PING command send when a connection is borrowed
 | 
					    # Enable/Disable PING command send when a connection is borrowed
 | 
				
			||||||
    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
 | 
					    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
 | 
				
			||||||
    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
					    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
				
			||||||
    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
 | 
					    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
 | 
				
			||||||
    # The property is used in the context of connection pooling in Redis
 | 
					    # The property is used in the context of connection pooling in Redis
 | 
				
			||||||
    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
					    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
				
			||||||
    # Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds
 | 
					    # Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds
 | 
				
			||||||
 | 
				
			|||||||
@ -114,9 +114,9 @@ redis:
 | 
				
			|||||||
    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
					    # Minumum number of idle connections that can be maintained in the pool without being closed
 | 
				
			||||||
    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
					    minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
 | 
				
			||||||
    # Enable/Disable PING command send when a connection is borrowed
 | 
					    # Enable/Disable PING command send when a connection is borrowed
 | 
				
			||||||
    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
 | 
					    testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
 | 
				
			||||||
    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
					    # The property is used to specify whether to test the connection before returning it to the connection pool.
 | 
				
			||||||
    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
 | 
					    testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
 | 
				
			||||||
    # The property is used in the context of connection pooling in Redis
 | 
					    # The property is used in the context of connection pooling in Redis
 | 
				
			||||||
    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
					    testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
 | 
				
			||||||
    # Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds
 | 
					    # Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user