diff --git a/pom.xml b/pom.xml
index e6d868411f..44d2fc5de6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.data
spring-data-redis
- 1.8.0.BUILD-SNAPSHOT
+ 1.8.0.DATAREDIS-523-SNAPSHOT
Spring Data Redis
diff --git a/src/main/asciidoc/reference/redis-repositories.adoc b/src/main/asciidoc/reference/redis-repositories.adoc
index 97529e0ca2..3ef6b219cb 100644
--- a/src/main/asciidoc/reference/redis-repositories.adoc
+++ b/src/main/asciidoc/reference/redis-repositories.adoc
@@ -453,6 +453,7 @@ public class TimeToLiveOnMethod {
----
====
+NOTE: Annotating a property explicitly with `@TimeToLive` will read back the actual `TTL` or `PTTL` value from Redis. -1 indicates that the object has no expire associated.
The repository implementation ensures subscription to http://redis.io/topics/notifications[Redis keyspace notifications] via `RedisMessageListenerContainer`.
diff --git a/src/main/java/org/springframework/data/redis/core/RedisKeyValueAdapter.java b/src/main/java/org/springframework/data/redis/core/RedisKeyValueAdapter.java
index 5a1e221867..4029f8de3d 100644
--- a/src/main/java/org/springframework/data/redis/core/RedisKeyValueAdapter.java
+++ b/src/main/java/org/springframework/data/redis/core/RedisKeyValueAdapter.java
@@ -23,6 +23,7 @@
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
import org.slf4j.Logger;
@@ -39,6 +40,7 @@
import org.springframework.data.keyvalue.core.AbstractKeyValueAdapter;
import org.springframework.data.keyvalue.core.KeyValueAdapter;
import org.springframework.data.keyvalue.core.mapping.KeyValuePersistentProperty;
+import org.springframework.data.mapping.PersistentProperty;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.data.redis.connection.RedisConnection;
@@ -58,6 +60,7 @@
import org.springframework.data.redis.util.ByteUtils;
import org.springframework.data.util.CloseableIterator;
import org.springframework.util.Assert;
+import org.springframework.util.NumberUtils;
import org.springframework.util.ObjectUtils;
/**
@@ -295,7 +298,7 @@ public Map doInRedis(RedisConnection connection) throws DataAcce
data.setId(stringId);
data.setKeyspace(stringKeyspace);
- return converter.read(type, data);
+ return readBackTimeToLiveIfSet(binId, converter.read(type, data));
}
/*
@@ -346,29 +349,18 @@ public List> getAllOf(final Serializable keyspace) {
final byte[] binKeyspace = toBytes(keyspace);
- List