add cache capability
Merge pull request #2 from blackbiron/master

fixed #1