18

I'm looking for a way to do a very simple TTL string in Redis:

So how do I do the equivalent of the following in StackExchange.Redis?

SETEX lolcat 10 "monorailcat"

I found KeyExpire, but that means every key I set needs two calls?

Paul T. Rawkeen
  • 3,994
  • 3
  • 35
  • 51
Dirk Boer
  • 8,522
  • 13
  • 63
  • 111

1 Answers1

27

Oops. Never mind:

_Redis.StringSet( "lolcat", "monorailcat", TimeSpan.FromSeconds(10) );

Dirk Boer
  • 8,522
  • 13
  • 63
  • 111