diff --git a/src/docbkx/reference/redis.xml b/src/docbkx/reference/redis.xml index ae6b1df4d..3a65af587 100644 --- a/src/docbkx/reference/redis.xml +++ b/src/docbkx/reference/redis.xml @@ -262,6 +262,21 @@ redisTemplate.opsForList().leftPush(userId, url.toExternalForm()); } }]]> + + For cases where a certain template view is needed, one the view as a dependency and inject the template: the container will automatically perform the conversion + eliminating the opsFor[X] calls: + + listOps; + + public void addLink(String userId, URL url) { + listOps.leftPush(userId, url.toExternalForm()); + } +}]]> + As with the other Spring templates, RedisTemplate and StringRedisTemplate allow the developer to talk directly to Redis through the RedisCallback interface: this gives complete control to the developer as it talks directly to the RedisConnection.