3 ms·
Essentially the OP is using the decorator to prevent the function call from ever being run more than one time. It’s at most once.
by whalesalad 6y ago
Essentially the OP is using the decorator to prevent the function call from ever being run more than one time. It’s at most once.
- faceplanted 6y agoMore specifically, it prevents a call being repeated _in quick succession_, if there are enough calls in between repetitions it'll fall out of the cache and be reprocessed.