//Delete old key and its value
513844
func (p *JsonPairs) NukeKeys(m string) {
	swap := make(JsonPairs, 0)
	for _, j := range *p { //j is key, value of JsonPair
		if j.K != m {
			swap = append(swap, j)
		}
	}
	*p = swap
}
330905
func (c *RedisCacher) Delete(key string) error {
	key = c.prefix + key
	if err := c.c.Del(key).Err(); err != nil {
		return err
	}

	if c.occupyMode {
		return nil
	}
	return c.c.HDel(c.hsetName, key).Err()
}
1110064
func (s *CacheOnStorage) Delete(key interface{}) error {
	if err := s.storage.Delete(key); err != nil {
		return err
	}

	return s.cache.Delete(key)
}
209498
func (d *Datastore) Delete(key ds.Key) (err error) {
	return d.child.Delete(d.ConvertKey(key))
}
1300398
func (s *GenericStorage) Delete(key interface{}) error {
	if s.del == nil && s.delMulti == nil {
		return errors.Newf(
			"'%s' does not have Delete/DeleteMulti implementation",
			s.name)
	}

	s.rwMutex.Lock()
	defer s.rwMutex.Unlock()

	if s.del != nil {
		return s.del(key)
	}
	return s.delMulti(key)
}
613526
func (s *RedisStore) Delete(key string) error {
	if !strings.HasPrefix(key, s.prefix) {
		key = s.prefix + key
	}
	return s.client.Del(key).Err()
}
1152001
func (j *Json) Del(key string) {
	m, err := j.Map()
	if err != nil {
		return
	}
	delete(m, key)
}
434434
func (c *BigCache) Delete(key string) error {
	hashedKey := c.hash.Sum64(key)
	shard := c.getShard(hashedKey)
	return shard.del(key, hashedKey)
}
194657
func (db *Database) Delete(key []byte) error {
	db.lock.Lock()
	defer db.lock.Unlock()

	if db.db == nil {
		return errMemorydbClosed
	}
	delete(db.db, string(key))
	return nil
}
52230
func (om *OrdMap) Delete(key interface{}) {
	rkey := ty.AssertType(key, om.ktype)

	// Avoid doing work if we don't need to.
	if !om.exists(rkey) {
		return
	}

	keysLen := om.keys.Len()
	for i := 0; i < keysLen; i++ {
		if key == om.keys.Index(i).Interface() {
			// om.keys = append(om.keys[:i], om.keys[i+1:]...)
			om.keys = reflect.AppendSlice(
				om.keys.Slice(0, i), om.keys.Slice(i+1, keysLen))
			break
		}
	}

	// Setting a key to a zero reflect.Value deletes the key from the map.
	om.m.SetMapIndex(rkey, reflect.Value{})
}
367563
func (wb *WriteBatch) Delete(key []byte) {
	cKey := byteToChar(key)
	C.rocksdb_writebatch_delete(wb.c, cKey, C.size_t(len(key)))
}
885551
func (s *MemorySession) Delete(key string) error {
	delete(s.data, key)
	return nil
}
164355
func (r *Redis) Delete(k models.Key) error {
	return r.client.Del(k.String()).Err()
}
539186
func (c *Scratch) Delete(key string) string {
	c.mu.Lock()
	delete(c.values, key)
	c.mu.Unlock()
	return ""
}
796229
func (m *MongoCache) delete(key string) error {
	query := func(c *mgo.Collection) error {
		err := c.RemoveId(key)
		return err
	}

	return m.run(m.CollectionName, query)
}
1207780
func (c *FileCacher) Delete(key string) error {
	return os.Remove(c.filepath(key))
}
604548
func (mem *Memcache) Delete(key string) error {
	return mem.conn.Delete(key)
}