redisToSql example

if ($this->redis === null) {
            throw new \RuntimeException('%shopware.cart.redis_url% is not configured and no url provided.');
        }

        $from = $input->getArgument('from');
        if (!\in_array($from['redis', 'sql'], true)) {
            throw new \RuntimeException('Invalid source storage: ' . $from . '. Valid values are "redis" or "sql".');
        }

        if ($from === 'redis') {
            return $this->redisToSql($input$output);
        }

        return $this->sqlToRedis($input$output);
    }

    protected function createIterator(): LastIdQuery
    {
        $query = $this->connection->createQueryBuilder();
        $query->addSelect(['cart.auto_increment', 'cart.token']);
        $query->from('cart');
        $query->andWhere('cart.auto_increment > :lastId');
        
Home | Imprint | This part of the site doesn't use cookies.