package cache func (p *RedisCache) LPush(key string, values ...interface{}) (int64, error) { if p.isCluster { return p.cluster.LPush(key, values).Result() } return p.client.LPush(key, values).Result() } func (p *RedisCache) RPush(key string, values ...interface{}) (int64, error) { if p.isCluster { return p.cluster.RPush(key, values).Result() } return p.client.RPush(key, values).Result() } func (p *RedisCache) LPop(key string) (string, error) { if p.isCluster { return p.cluster.LPop(key).Result() } return p.client.LPop(key).Result() } func (p *RedisCache) RPop(key string) (string, error) { if p.isCluster { return p.cluster.RPop(key).Result() } return p.client.RPop(key).Result() } func (p *RedisCache) LRange(key string, start, stop int64) ([]string, error) { if p.isCluster { return p.cluster.LRange(key, start, stop).Result() } return p.client.LRange(key, start, stop).Result() }