redis-lru icon indicating copy to clipboard operation
redis-lru copied to clipboard

fix bug, remove unnessary codes

Open superjcd opened this issue 2 years ago • 0 comments

Following codes bring bugs when no params provided for the decorator

if callable(ttl):
    func = ttl
    ttl = 60 * 15
    return wraps(func)(inner)

the ttl will ways be 60 *15 , cuz when params is not provided for the decorator, the ttl param here will always became the function being wrapped, which will always lead this statemet to TRUE, and the default_ttl will not work too

superjcd avatar Sep 21 '22 08:09 superjcd