Added cache decorator.
Review fixes
Merge pull request #6 from przemekmazurek/BUG_3921

Added cache decorator.