Mw/tunecache

This branch should close #140 and be merged in the quad-0.7 branch without issues.