adds caching to stub.
moves import.
Merge pull request #12 from birkin/master

adds caching to stub.