FreeRedis icon indicating copy to clipboard operation
FreeRedis copied to clipboard

MSet with Expiration

Open MartyBJones opened this issue 4 years ago • 2 comments

Does this client support bulk setting key/values with an expiration?

MartyBJones avatar May 18 '21 21:05 MartyBJones

You can use pipes, or Lua scripts.

1、Pipeline

using (var pipe = cli.StartPipe())
{
    pipe.Set("key1", x1, 10);
    pipe.Set("key2", x2, 10);
    pipe.Set("key3", x3, 10);
    pipe.EndPipe();
}

2、Lua script

see Google.

2881099 avatar May 18 '21 23:05 2881099

Awesome! Thank you!

I like the client you have built.

On Tue, May 18, 2021 at 6:44 PM 2881099 @.***> wrote:

You can use pipes, or Lua scripts.

1、Pipeline

using (var pipe = cli.StartPipe())

{

pipe.Set("key1", x1, 10);

pipe.Set("key2", x2, 10);

pipe.Set("key3", x3, 10);

pipe.EndPipe();

}

2、Lua script

see Google.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/2881099/FreeRedis/issues/62#issuecomment-843638634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA562VQUIMIV4FZEOHKE7QTTOL3W3ANCNFSM45DJVRUA .

MartyBJones avatar May 19 '21 00:05 MartyBJones