added read-only and write-only modes to caching layer