Tanmoy Sarkar
Tanmoy Sarkar

Reputation: 1

Redis Cache issue in AWS

I want my redis key will never expire so I have given a big expire number

await _redisDatabase.StringSetAsync(key, serializedObject, TimeSpan.FromSeconds(Int32.MaxValue), When.NotExists);

But after every 30 min when every I am trying to retrieve the values in redis cache it is showing multiple operations and taking time.

"subscribe" "Booksleeve_MasterChanged"
1572964169.258388 [0 10.0.1.123:37602] "get" "Booksleeve_TieBreak"
1572964169.258395 [0 10.0.1.123:37602] "get" "Booksleeve_TieBreak"
1572964169.258400 [0 10.0.1.123:37602] "info" "replication"
1572964169.258411 [0 10.0.1.123:37602] "ping"
1572964169.258413 [0 10.0.1.123:37602] "ping"
1572964169.279451 [0 10.0.1.123:37602] "get" "3118"
1572964171.281458 [0 10.0.1.123:37602] "get" "sr-dev-Countries"
1572964185.990889 [0 10.0.2.175:29181] "info" "replication"
1572964185.990960 [0 10.0.2.175:20613] "unsubscribe" "\xab\x1a\xfb\xa5\x8a]RB\x8

Can anybody help me to understand what I am doing wrong.

Upvotes: 0

Views: 150

Answers (1)

TheDude
TheDude

Reputation: 3952

If you don't want your key to expire, do not put a TTL. Redis doesn't require a TTL for keys.

Upvotes: 2

Related Questions