// Get retrieves a session value based on the key.
514190
func (db *Database) Get(sid string, key string) (value interface{}) {
	err := db.Service.View(func(txn *badger.Txn) error {
		item, err := txn.Get(makeKey(sid, key))
		if err != nil {
			return err
		}

		// return item.Value(func(valueBytes []byte) {
		// 	if err := sessions.DefaultTranscoder.Unmarshal(valueBytes, &value); err != nil {
		// 		golog.Error(err)
		// 	}
		// })

		valueBytes, err := item.Value()
		if err != nil {
			return err
		}

		return sessions.DefaultTranscoder.Unmarshal(valueBytes, &value)
	})

	if err != nil && err != badger.ErrKeyNotFound {
		return nil
	}

	return
}
614751
func (c *Cache) Get(key string) (resp []byte, ok bool) {
	var err error
	resp, err = c.db.Get([]byte(key), nil)
	if err != nil {
		return []byte{}, false
	}
	return resp, true
}
222042
func (c *Cache) Get(key string) (resp []byte, ok bool) {
	item, err := c.Client.Get(cacheKey(key))
	if err != nil {
		return nil, false
	}
	return item.Value, true
}
476561
func (session *Session) Get(bean interface{}) (bool, error) {
	if session.isAutoClose {
		defer session.Close()
	}
	return session.get(bean)
}
588447
func (c *Cache) Get(key interface{}) (value interface{}, ok bool) {
	c.lock.Lock()
	value, ok = c.lru.Get(key)
	c.lock.Unlock()
	return value, ok
}
616214
func (m *Manager) Get(r *http.Request, name string) (*Session, error) {
	s := Session{
		Name:     name,
		Domain:   m.config.Domain,
		Path:     m.config.Path,
		HTTPOnly: m.config.HTTPOnly,
		MaxAge:   m.config.MaxAge,
		Secure:   m.isSecure(r),
		SameSite: m.config.SameSite,
		Rolling:  m.config.Rolling,
	}

	// get session id from cookie
	cookie, err := r.Cookie(name)
	if err == nil && len(cookie.Value) > 0 {
		var rawID string

		// verify signature
		if len(m.config.Keys) > 0 {
			parts := strings.Split(cookie.Value, ".")
			rawID = parts[0]

			if len(parts) != 2 || !verify(rawID, parts[1], m.config.Keys) {
				goto invalidSignature
			}
		} else {
			rawID = cookie.Value
		}

		hashedID := m.hashID(rawID)

		// get session data from store
		s.data, err = m.config.Store.Get(hashedID, makeStoreOption(m, &s))
		if err == nil {
			s.rawID = rawID
			s.id = hashedID
		} else if err != ErrNotFound {
			return nil, err
		}

		// DO NOT set session id to cookie value if not found in store
		// to prevent session fixation attack
	}
invalidSignature:

	if len(s.id) == 0 {
		s.rawID = m.config.GenerateID()
		s.id = m.hashID(s.rawID)
		s.isNew = true
	}

	return &s, nil
}
332910
func (d *dalStore) Get(r *http.Request, name string) (*gSessions.Session, error) {
	return gSessions.GetRegistry(r).Get(d, name)
}
1110215
func (c *LedisCacher) Get(key string) interface{} {
	val, err := c.c.Get([]byte(key))
	if err != nil || len(val) == 0 {
		return nil
	}
	return string(val)
}
1125893
func (c *memoryCache) Get(key string) ([]byte, error) {
	c.RLock()
	defer c.RUnlock()

	cached, ok := c.cache[key]
	if ok {
		return cached, nil
	}

	return nil, nil
}
989658
func (r *ConnectionValues) Get(key string) interface{} {
	args := *r
	n := len(args)
	for i := 0; i < n; i++ {
		kv := &args[i]
		if string(kv.key) == key {
			return kv.value
		}
	}
	return nil
}
1280023
func (c *Cache) Get(key string) (value interface{}, err error) {
	out := struct {
		Cache string      `json:"cache"`
		Key   string      `json:"key"`
		Value interface{} `json:"value"`
	}{}
	if err = c.caches(c.Name, "items", key).Req("GET", nil, &out); err == nil {
		value = out.Value
	}
	return
}
1030406
func (rc *Memcache) Get(key string) (interface{}, error) {
	val, err := rc.c.Get(Md5(key))
	if err != nil || val == nil {
		if err != nil && rc.Debug {
			log.Println("[Memcache]GetErr: ", err, "Key:", key)
		}
		return nil, err
	}

	var v interface{}
	err = Decode(val.Value, &v)
	if err != nil {
		if rc.Debug {
			log.Println("[Memcache]DecodeErr: ", err, "Key:", key)
		}
		return nil, err
	}

	if rc.Debug {
		log.Println("[Memcache]Get: ", key)
	}
	return v, err
}
965177
func (s *StorageOverseer) Get(w http.ResponseWriter, r *http.Request) (value string, err error) {
	sessID, err := s.options.getCookieValue(w, r)
	if err != nil {
		return "", errors.Wrap(err, "unable to get session id from cookie")
	}

	val, err := s.Storer.Get(sessID)
	if err != nil {
		return "", errors.Wrap(err, "unable to get session value")
	}

	return val, nil
}
288911
func (st *MemSessionStore) Get(key interface{}) interface{} {
	st.lock.RLock()
	defer st.lock.RUnlock()
	if v, ok := st.value[key]; ok {
		return v
	}
	return nil
}
429682
func (v *Values) Get(key Key) (value interface{}) {
	value, _ = v.GetOk(key)
	return value
}
925533
func (c *Context) Get(key string) (value interface{}, exists bool) {
	value, exists = c.Keys[key]
	return
}
119432
func (kv *KV) Get(key []byte) (value []byte) {
	value, _ = kv.db.Get(key, nil)
	return
}