1

I have a cache with Redis, using ServiceStack.Redis to access Redis in C#, I need to set expiration time for a hash, I've been reading on the internet that there is no way to set expiration time in a Hash, I should set expiration time in my keys inside my Hash.

I have the following code but its not working.

cache.SetEntryInHash(Hash, key, Item);
cache.ExpireEntryAt(key, DateTime.Now.Add(TimeSpan.FromSeconds(30)));
Alan Almeida
  • 139
  • 2
  • 13

1 Answers1

1

there is no way to expire key in hash and you can set expire for top level key answer of owner

Mehdi
  • 1,731
  • 1
  • 18
  • 33