fixed run cached
added unit test
Merge pull request #38 from edx/fix-run-cached

fixed run cached