Minor cleanup of InMemoryFormat: added validation in config + minor usage cleanup
InMemoryFormat.CACHED now makes use of byte comparison instead of object comparison