Пример #1
0
// Deletes value associated with the given key from the cache.
//
// Returns true on success, false if there was no such value in the cache.
func (cache *Cache) Delete(key []byte) bool {
	cache.dg.CheckLive()
	var k C.struct_ybc_key
	initKey(&k, key)
	return C.ybc_item_remove(cache.ctx(), &k) != C.int(0)
}
Пример #2
0
// Deletes value associated with the given key from the cache.
//
// Returns true on success, false if there was no such value in the cache.
func (cache *Cache) Delete(key []byte) bool {
	cache.dg.CheckLive()
	k := newKey(key)
	return C.ybc_item_remove(cache.ctx(), &k) != C.int(0)
}