package com.bizofficer.configurations;

//import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.annotation.EnableCaching;
//import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
//import org.springframework.data.redis.connection.RedisPassword;
//import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
//import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
//import org.springframework.data.redis.core.RedisTemplate;

//import redis.clients.jedis.JedisPoolConfig;

@Configuration
@EnableCaching
public class BeanConfig {

//	@Value("${spring.redis.host}")
//	private String REDIS_HOSTNAME;
//
//	@Value("${spring.redis.port}")
//	private int REDIS_PORT;
//	
//	@Value("${spring.redis.password}")
//	private String REDIS_PASSWORD;
	
//    @Bean
//    JedisConnectionFactory jedisConnectionFactory() {
//        RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration(REDIS_HOSTNAME, REDIS_PORT);
//        redisStandaloneConfiguration.setPassword(RedisPassword.of(REDIS_PASSWORD));
//        return new JedisConnectionFactory(redisStandaloneConfiguration);
//    }
//
//    @Bean
//    public RedisTemplate redisTemplate() {
//        RedisTemplate template = new RedisTemplate<>();
//        template.setConnectionFactory(jedisConnectionFactory());
//        return template;
//    }
    
//    @Bean
//    public JedisPoolConfig poolConfig() {
//        final JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
//        jedisPoolConfig.setTestOnBorrow(true);
//        jedisPoolConfig.setMaxTotal(100);
//        jedisPoolConfig.setMaxIdle(100);
//        jedisPoolConfig.setMinIdle(10);
//        jedisPoolConfig.setTestOnReturn(true);
//        jedisPoolConfig.setTestWhileIdle(true);
//        return jedisPoolConfig;
//    }
    
    
}