How to handle high traffic when Redis cache is cleared?

You can try the XFetch algorithm: Optimal Probabilistic Cache Stampede Prevention, which do probabilistic early expirations.

function XFetch(key, ttl; β = 1)
    value, ∆, expiry ← CacheRead(key)
    if !value or Time() − ∆β log(rand()) ≥ expiry then
        start ← Time()
        value ← RecomputeValue()
        ∆ ← Time() – start CacheWrite(key, (value, ∆), ttl)
    end
    return value
end

It does probabilistic recomputing the value before the key expires. Check the paper for detail.

Another Solution

If you know which keys are the hottest ones, you can have an extra thread/process, which does the computation, i.e. redisGetKey, and update the value and TTL before the key expires. So that the hottest keys never expire.