added caching for binary values in read-only mode