<commit_before>package utils

import (
	"bytes"
	"errors"
	"github.com/garyburd/redigo/redis"
	"time"

	"github.com/techjanitor/pram-get/config"
)

// RedisStore holds a handle to the Redis pool
type RedisStore struct {
	pool *redis.Pool
}

var (
	RedisCache   RedisStore
	ErrCacheMiss = errors.New("cache: key not found.")
	buffer       bytes.Buffer
)

// NewRedisCache creates a new pool
func NewRedisCache() {
	RedisCache.pool = &redis.Pool{
		MaxIdle:     config.Settings.Redis.MaxIdle,
		MaxActive:   config.Settings.Redis.MaxActive,
		IdleTimeout: 240 * time.Second,
		Dial: func() (redis.Conn, error) {
			c, err := redis.Dial(config.Settings.Redis.Protocol, config.Settings.Redis.Address)
			if err != nil {<commit_msg>config update<commit_after>package utils

import (
	"bytes"
	"errors"
	"github.com/garyburd/redigo/redis"
	"time"

	"github.com/techjanitor/pram-post/config"
)

// RedisStore holds a handle to the Redis pool
type RedisStore struct {
	pool *redis.Pool
}

var (
	RedisCache   RedisStore
	ErrCacheMiss = errors.New("cache: key not found.")
	buffer       bytes.Buffer
)

// NewRedisCache creates a new pool
func NewRedisCache() {
	RedisCache.pool = &redis.Pool{
		MaxIdle:     config.Settings.Redis.MaxIdle,
		MaxActive:   config.Settings.Redis.MaxConnections,
		IdleTimeout: 240 * time.Second,
		Dial: func() (redis.Conn, error) {
			c, err := redis.Dial(config.Settings.Redis.Protocol, config.Settings.Redis.Address)
			if err != nil {
{'fraction_non_alphanumeric': 0.12191780821917808, 'fraction_numerical': 0.00410958904109589, 'mean_word_length': 3.837748344370861, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5473332', 'n_tokens_mistral': 563, 'n_tokens_neox': 538, 'n_words': 117}