Add flags to disable cache reads and/or writes

Fixes #10