Caching layer with shelve .

Fixes #5.