Remove unused variable
Cache enabled flag in the closure
Merge pull request #4 from Y--/master

Tiny optimisation