(tx *bolt.Tx, sid string)
| 88 | } |
| 89 | |
| 90 | func (db *Database) getBucketForSession(tx *bolt.Tx, sid string) *bolt.Bucket { |
| 91 | b := db.getBucket(tx).Bucket([]byte(sid)) |
| 92 | if b == nil { |
| 93 | // session does not exist, it shouldn't happen, session bucket creation happens once at `Acquire`, |
| 94 | // no need to accept the `bolt.bucket.CreateBucketIfNotExists`'s performance cost. |
| 95 | db.logger.Debugf("unreachable session access for '%s'", sid) |
| 96 | } |
| 97 | |
| 98 | return b |
| 99 | } |
| 100 | |
| 101 | var ( |
| 102 | expirationBucketName = []byte("expiration") |