Cache keys now include args and kwargs.
Moves cache and lock to decorator scope.