// Has check if the cache key exists, panic when an error occurs.
Has check if the cache key exists, panic when an error occurs.
// Has check if the cache key exists panic when an error occurs .
func (r *RedisCache) Has(ctx context.Context, key string) bool {
	res, err := r.client.Exists(ctx, r.realKey(key)).Result()
	if err != nil {
		panic(fmt.Errorf("redis exists error: %w", err))
	}
	return res > 0
}
func ( r * RedisCache ) Has ( ctx context . Context , key string ) bool { res , err := r . client . Exists ( ctx , r . realKey ( key ) ) . Result ( ) if err != nil { panic ( fmt . Errorf ( " " , err ) ) } return res > 0 }
Has check if the cache key exists, panic when an error occurs.
Has check if the cache key exists panic when an error occurs .