Bug 1962 - Adds a caching decorator.

Gist: https://gist.github.com/rszalski/2dbed277e16ca080e94a