// Set sets the value for the given key into cache, panic when an error occurs.
Set sets the value for the given key into cache, panic when an error occurs.
// Set sets the value for the given key into cache panic when an error occurs .
func (r *RedisCache) Set(ctx context.Context, key string, value interface{}, ttl time.Duration) {
	err := r.client.SetEX(ctx, r.realKey(key), value, ttl).Err()
	if err != nil {
		panic(fmt.Errorf("redis set error: %w", err))
	}
}
func ( r * RedisCache ) Set ( ctx context . Context , key string , value interface { } , ttl time . Duration ) { err := r . client . SetEX ( ctx , r . realKey ( key ) , value , ttl ) . Err ( ) if err != nil { panic ( fmt . Errorf ( " " , err ) ) } }
Set sets the value for the given key into cache, panic when an error occurs.
Set sets the value for the given key into cache panic when an error occurs .