TRUNK-4140 Did the changes according to the github comments

refering pr: https://github.com/openmrs/openmrs-core/pull/844

ticket: https://issues.openmrs.org/browse/TRUNK-4140

changes : used runtimeProperties.putAll(cache) instead of copying the cache manually.
                 place the creating cache at the correct place