Resolves Issue #226: Modified createCache to return the created Cache or throw an exception if it could not be created.