upstash / issues

Issue Tracker for Upstash
https://upstash.com
2 stars 0 forks source link

Error command count #98

Open vwer opened 7 months ago

vwer commented 7 months ago

The following code consumes 20 counts, it should be 10 counts

`import { Redis } from "@upstash/redis/cloudflare";

export default { async fetch(request, env) { const redis = Redis.fromEnv(env);

        const p = redis.pipeline();
        p.hgetall("user1");
        p.hgetall("user2");
        p.hgetall("user3");
        p.hgetall("user4");
        p.hgetall("user5");
        p.hgetall("user6");
        p.hgetall("user7");
        p.hgetall("user8");
        p.hgetall("user9");
        p.hgetall("user10");

        const res = await p.exec();

        return new Response(JSON.stringify(res));

},

};`