Skip to content

Commit

Permalink
Merge pull request #21 from Etiennera/patch-1
Browse files Browse the repository at this point in the history
Expose redistore's SetMaxLength
  • Loading branch information
ipfans authored Nov 17, 2018
2 parents 2c0b18e + bd3a59d commit acc7adb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions redis_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,13 @@ func (c *redisStore) Options(options Options) {
func (c *redisStore) MaxAge(age int) {
c.RediStore.SetMaxAge(age)
}

// MaxLength sets RediStore.maxLength if the `l` argument is greater or equal 0
// maxLength restricts the maximum length of new sessions to l.
// If l is 0 there is no limit to the size of a session, use with caution.
// The default for a new RediStore is 4096. Redis allows for max.
// value sizes of up to 512MB (http://redis.io/topics/data-types)
// Default: 4096,
func (c *redisStore) MaxLength(length int) {
c.RediStore.SetMaxLength(length)
}

0 comments on commit acc7adb

Please sign in to comment.