<commit_before>package main

import (
	"encoding/json"
	"github.com/garyburd/redigo/redis"
	"github.com/realglobe-Inc/edo/driver"
	"time"
)

func newRedisSessionContainer(minIdLen int, pool *redis.Pool, tag string, caStaleDur, caExpiDur time.Duration) sessionContainer {
	return newSessionContainerImpl(
		driver.NewRedisTimeLimitedKeyValueStore(pool, tag+":", json.Marshal, unmarshalSession, getDummyStamp, caStaleDur, caExpiDur),
		minIdLen)
}
<commit_msg>セッション型の更新日時を使うようにした<commit_after>package main

import (
	"encoding/json"
	"github.com/garyburd/redigo/redis"
	"github.com/realglobe-Inc/edo/driver"
	"strconv"
	"time"
)

func getSessionStamp(val interface{}) *driver.Stamp {
	sess, _ := val.(*session)
	upd := sess.updateDate()
	return &driver.Stamp{Date: upd, Digest: strconv.FormatInt(upd.UnixNano(), 16)}
}

func newRedisSessionContainer(minIdLen int, pool *redis.Pool, tag string, caStaleDur, caExpiDur time.Duration) sessionContainer {
	return newSessionContainerImpl(
		driver.NewRedisTimeLimitedKeyValueStore(pool, tag+":", json.Marshal, unmarshalSession, getSessionStamp, caStaleDur, caExpiDur),
		minIdLen)
}

{'fraction_non_alphanumeric': 0.12266666666666666, 'fraction_numerical': 0.0017777777777777779, 'mean_word_length': 6.712328767123288, 'pattern_counts': {'":': 2, '<': 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': '893850', 'n_tokens_mistral': 445, 'n_tokens_neox': 420, 'n_words': 71}