List of usage examples for org.springframework.data.redis.connection RedisConnection scriptLoad
@Nullable
String scriptLoad(byte[] script);
From source file:com.zxy.commons.cache.RedisUtils.java
/** * Load lua script into scripts cache, without executing it.<br> * Execute the script by calling {@link #evalSha(String, ReturnType, int, byte[])}. * <p>// ww w. jav a 2s. c om * See http://redis.io/commands/script-load * * @param script script * @return String */ public static String scriptLoad(byte[] script) { return redisTemplate.execute(new RedisCallback<String>() { @Override public String doInRedis(RedisConnection redis) throws DataAccessException { return redis.scriptLoad(script); } }); }
From source file:com.zxy.commons.cache.RedisHelper.java
/** * Load lua script into scripts cache, without executing it.<br> * Execute the script by calling {@link #evalSha(String, ReturnType, int, byte[])}. * <p>/* ww w. j a v a2 s.c o m*/ * See http://redis.io/commands/script-load * * @param script script * @return String */ public String scriptLoad(byte[] script) { return redisTemplate.execute(new RedisCallback<String>() { @Override public String doInRedis(RedisConnection redis) throws DataAccessException { return redis.scriptLoad(script); } }); }