ddth-cache-adapter-core/src/main/java/com/github/ddth/cacheadapter/cacheimpl/redis/BaseRedisCache.java
@Override
    public BaseRedisCache init() {
        super.init();

        long expireAfterWrite = getExpireAfterWrite();
        long expireAfterAccess = getExpireAfterAccess();
        if (expireAfterAccess > 0 || expireAfterWrite > 0) {
            timeToLiveSeconds = expireAfterAccess > 0 ? expireAfterAccess : expireAfterWrite;
        } else {
            timeToLiveSeconds = -1;
        }

        /*
         * Parse custom property: key-mode
         */
        KeyMode oldKeyMode = this.keyMode;
        try {
            this.keyMode = KeyMode.valueOf(getCacheProperty(CACHE_PROP_KEY_MODE).toUpperCase());
        } catch (Exception e) {
            this.keyMode = oldKeyMode;
            if (getCacheProperty(CACHE_PROP_KEY_MODE) != null) {
                LOGGER.warn(e.getMessage(), e);
            }
        }

        /*
         * Parse custom property: ttl-seconds
         */
        long oldTTL = this.timeToLiveSeconds;
        try {
            this.timeToLiveSeconds = Long.parseLong(getCacheProperty(CACHE_PROP_TTL_SECONDS));
        } catch (Exception e) {
            this.timeToLiveSeconds = oldTTL;
            if (getCacheProperty(CACHE_PROP_TTL_SECONDS) != null) {
                LOGGER.warn(e.getMessage(), e);
            }
        }

        /*
         * Parse custom property: redis-password
         */
        String password = getCacheProperty(CACHE_PROP_REDIS_PASSWORD);
        if (!StringUtils.isBlank(password)) {
            this.redisPassword = password;
        }

        return this;
    }
@Override
    public BaseRedisCache init() {
        super.init();

        long expireAfterWrite = getExpireAfterWrite();
        long expireAfterAccess = getExpireAfterAccess();
        if (expireAfterAccess > 0 || expireAfterWrite > 0) {
            timeToLiveSeconds = expireAfterAccess > 0 ? expireAfterAccess : expireAfterWrite;
        } else {
            timeToLiveSeconds = -1;
        }

        /*
         * Parse custom property: key-mode
         */
        KeyMode oldKeyMode = this.keyMode;
        try {
            this.keyMode = KeyMode.valueOf(getCacheProperty(CACHE_PROP_KEY_MODE).toUpperCase());
        } catch (Exception e) {
            this.keyMode = oldKeyMode;
            if (getCacheProperty(CACHE_PROP_KEY_MODE) != null) {
                LOGGER.warn(e.getMessage(), e);
            }
        }

        /*
         * Parse custom property: ttl-seconds
         */
        long oldTTL = this.timeToLiveSeconds;
        try {
            this.timeToLiveSeconds = Long.parseLong(getCacheProperty(CACHE_PROP_TTL_SECONDS));
        } catch (Exception e) {
            this.timeToLiveSeconds = oldTTL;
            if (getCacheProperty(CACHE_PROP_TTL_SECONDS) != null) {
                LOGGER.warn(e.getMessage(), e);
            }
        }

        /*
         * Parse custom property: redis-password
         */
        String password = getCacheProperty(CACHE_PROP_REDIS_PASSWORD);
        if (!StringUtils.isBlank(password)) {
            this.redisPassword = password;
        }

        return this;
    }
{@inheritDoc}