Adds a cache decorator.
Disables pylint warning.