Example usage for org.springframework.data.redis.connection RedisConnection scriptFlush

List of usage examples for org.springframework.data.redis.connection RedisConnection scriptFlush

Introduction

In this page you can find the example usage for org.springframework.data.redis.connection RedisConnection scriptFlush.

Prototype

void scriptFlush();

Source Link

Document

Flush lua script cache.

Usage

From source file:com.zxy.commons.cache.RedisUtils.java

/**
 * Flush lua script cache.// www.j a  v a2 s.  co  m
 * <p>
 * See http://redis.io/commands/script-flush
 */
public static void scriptFlush() {
    redisTemplate.execute(new RedisCallback<Void>() {
        @Override
        public Void doInRedis(RedisConnection redis) throws DataAccessException {
            redis.scriptFlush();
            return null;
        }
    });
}

From source file:com.zxy.commons.cache.RedisHelper.java

/**
 * Flush lua script cache./*  w  w  w . j a  va 2  s. c  o  m*/
 * <p>
 * See http://redis.io/commands/script-flush
 */
public void scriptFlush() {
    redisTemplate.execute(new RedisCallback<Void>() {
        @Override
        public Void doInRedis(RedisConnection redis) throws DataAccessException {
            redis.scriptFlush();
            return null;
        }
    });
}