redis-lru
redis-lru copied to clipboard
fix bug, remove unnessary codes
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