fixes #34 --max-cache-size flag
Merge branch 'max-memory' into develop