-
Notifications
You must be signed in to change notification settings - Fork 12
/
config.go
30 lines (22 loc) · 753 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package memcache
// session memcache config
type Config struct {
// memcache server list
ServerList []string
// MaxIdleConns specifies the maximum number of idle connections that will
// be maintained per address. If less than one, DefaultMaxIdleConns will be
// used.
//
// Consider your expected traffic rates and latency carefully. This should
// be set to a number higher than your peak parallel requests.
MaxIdle int
// sessionId as memcache key prefix
KeyPrefix string
// session value serialize func
SerializeFunc func(data map[string]interface{}) ([]byte, error)
// session value unSerialize func
UnSerializeFunc func(data []byte) (map[string]interface{}, error)
}
func (mc *Config) Name() string {
return ProviderName
}