MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / delete

Method delete

tlsutil/ccache.go:186–196  ·  view source on GitHub ↗
(sessionKey string)

Source from the content-addressed store, hash-verified

184}
185
186func (cache *PersistentClientSessionCache) delete(sessionKey string) {
187 err := cache.db.Update(func(tx *bbolt.Tx) error {
188 if bucket := tx.Bucket(bucketName); bucket != nil {
189 return bucket.Delete([]byte(sessionKey))
190 }
191 return nil
192 })
193 if err != nil {
194 cache.logger.Error("cache db: key %q delete failed: %v", sessionKey, err)
195 }
196}
197
198func (cache *PersistentClientSessionCache) put(sessionKey string, cs *tls.ClientSessionState) {
199 csBytes, err := clientSessionStateToBytes(cs)

Callers 1

PutMethod · 0.95

Calls 2

DeleteMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected