init(broker) {
		super.init(broker);
		try {
			Redis = require("ioredis");
		} catch (err) {
			/* istanbul ignore next */
			this.broker.fatal(
				"The 'ioredis' package is missing. Please install it with 'npm install ioredis --save' command.",
				err,
				true
			);
		}
		/**
		 * ioredis client instance
		 * @memberof RedisCacher
		 */
		if (this.opts.cluster) {
			if (!this.opts.cluster.nodes || this.opts.cluster.nodes.length === 0) {
				throw new BrokerOptionsError("No nodes defined for cluster");
			}

			this.client = new Redis.Cluster(this.opts.cluster.nodes, this.opts.cluster.options);
		} else {
			this.client = new Redis(this.opts.redis);
		}

		this.connected = false;

		this.client.on("ready", () => {
			this.connected = true;

			/* istanbul ignore next */
			this.logger.info("Redis cacher connected.");
		});

		this.client.on("error", err => {
			this.connected = false;

			this.broker.broadcastLocal("$cacher.error", {
				error: err,
				module: "cacher",
				type: C.CLIENT_ERROR
			});

			/* istanbul ignore next */
			this.logger.error(err);
		});

		// check for !== false for backwards compatibility purposes; should be changed to opt-in in a breaking change release
		if (this.opts.redlock !== false) {
			let Redlock;
			try {
				Redlock = require("redlock");
			} catch (err) {
				Redlock = null;
			}
			if (Redlock != null) {
				let redlockClients = (this.opts.redlock ? this.opts.redlock.clients : null) || [
					this.client
				];

				this.redlock = new Redlock(redlockClients, _.omit(this.opts.redlock, ["clients"]));
				// Non-blocking redlock client, used for tryLock()
				this.redlockNonBlocking = new Redlock(redlockClients, {
					retryCount: 0
				});
			}
		}
		if (this.opts.monitor) {
			/* istanbul ignore next */
			this.client.monitor((err, monitor) => {
				this.logger.debug("Redis cacher entering monitoring mode...");
				monitor.on("monitor", (time, args /*, source, database*/) => {
					this.logger.debug(args);
				});
			});
		}

		// create an instance of serializer (default to JSON)
		this.serializer = Serializers.resolve(this.opts.serializer);
		this.serializer.init(this.broker);

		// add interval for ping if set
		if (this.opts.pingInterval > 0) {
			this.pingIntervalHandle = setInterval(() => {
				this.client
					.ping()
					.then(() => {
						this.connected = true;

						this.logger.debug("Sent PING to Redis Server");
					})
					.catch(err => {
						this.connected = false;

						this.broker.broadcastLocal("$cacher.error", {
							error: err,
							module: "cacher",
							type: C.FAILED_SEND_PING
						});

						this.logger.error("Failed to send PING to Redis Server", err);
					});
			}, Number(this.opts.pingInterval));
		}

		this.logger.debug("Redis Cacher created. Prefix: " + this.prefix);
	}
Initialize cacher. Connect to Redis server

@param {any} broker

@memberof RedisCacher