Switched underlying connector from Rediscala, which is no longer maintained, to Lettuce. #301
Provided support for MasterSlave configuration, which writes data to the master, and reads from one of the slave nodes. #295
Migration to Pekko and Play 3.0, thanks to @TomJKing for help in #272, finished in #278
Added support to Scala 3 in #264
Updated to Play 2.9.0
and dropped Scala 2.12
since it was discontinued from the Play framework.
Minimal supported Java version is now 11
. #265
Migrated from test framework specs2
to scalatest
because specs2 is not friendly to
cross-compilation between Scala 2.13 and Scala 3. Test are uses testcontainers
to run
standalone, cluster or sentinel instance. However, current redis connector is not friendly
and there are several significant limitations in the implementation, therefore the tests
for cluster are using fixed port mapping and tests for sentinel are disabled since it seems
that sentinel implementation is not fully reliable, therefore sentinel is not officially
supported at this moment. #273
Installed linters and formatters - scalafmt, scalafix, wartremover. #275
SET command supports milliseconds, previous versions used seconds #247
Added support for sorted sets ZSET #259
Support of DEL
operation in redis cluster #230
Update to Play 2.8.0
, dropped Scala 2.11
since it was discontinued from the Play framework.
Credits to Tomofumi Tanaka. #225
Java interop: Changed internal manifest for null
values from ""
to "null"
since
an empty string was not properly deserialized and caused NullPointerException
.
See #222 for more details.
Note: This should not be a breaking change since it was not possible to properly deserialize
the value in Java without encountering the exception.
Introduced another source aws-cluster
, which is a cluster with nodes defined by DNS record. For example,
Amazon AWS uses this kind of cluster definition. Therefore this type of a cluster resolves
a domain main to extract all nodes. See #221 for more details.
Added expiresIn(key: String): Option[Duration]
implementing PTTL
command to get expiration of the given key. #204
Introduced asynchronous implementation of advanced Java API for redis cache. The API
wraps the Scala version thus provides slightly worse performance and deals with
the lack of classTag
in Play's API design. This API implementation is experimental
and may change in future. Feedback will be welcome. #206
Added getFields(fields: String*)
and getFields(fields: Iterable[String])
into RedisMap
API
implementing HMGET command. #207
Exposed RedisConnector
in RedisCacheComponents
and RedisCacheModule
to enable
health check implementation #212.
Cross-compiled with Scala 2.13 #211.
Update to Play 2.7.0
#202
Added getAll[T: ClassTag](keys: Iterable[String]): Result[Seq[Option[T]]]
into AbstractCacheApi
in order to also accept collections aside vararg. #194
Fixed getOrElse
method in Synchronous API with non-empty cache prefix. #196
Support of Redis Sentinel #181
Fixed operation matching
with prefixed a instance.
Returned keys are automatically unprefixed. #184
Support of plain arrays in JavaRedis #176.
Connection timeout introduced in #147 is now configurable and can be disabled #174.
Removed deprecations introduced in 2.0.0 and 2.1.0.
JDK 10 compatibility. Replace deprecated com.sun.misc.BASE64* usages with jdk8 java.util.Base64 #170.
Customized release process to automatically update versions in README and documentation #173.
Scope of the Mockito dependency is set to Test, was Compile #168.
Published snapshots no longer depends on scoverage runtime #143.
play.cache.AsyncCacheApi
is bound to JavaRedis
instead of DefaultAsyncCacheApi
to fixed value deserialization and support Java HTTP context #140.
Standalone client now fails eagerly when the connection to redis is not established. This is to avoid long timeout while the rediscala is trying to reconnect. #147
Replaced SETNX
and SETEX
by SET
operation with EX
and NX
parameters to
implement the set operation atomically. In consequence, slightly changed RedisConnector
API.
#156
Deprecated timeout
property and replaced by sync-timeout
with the identical
meaning and use. Will be removed by 2.2.0. #154
Introduced optional redis-timeout
property indicating timeout on redis queries.
This is the workaround as the rediscala has no timeout on the requests and they might
be never completed. However, to avoid performance issues, the timeout is disabled by default.
See the configuration for more details. #154
Rediscala bumped to 1.8.3 and subsequently Akka bumped to 2.5.6 #150.
Revamped tests, reduced their number but increased value and code coverage #108
Named caches now uses @NamedCache
instead of @Named
to be consistent with Play's EhCache and
enable interchangeability of the implementation.
Migration: Change the annotation where necessary.
Backward compatibility: In simple scenarios, there should
be no breaking changes. Use of @Named
was deprecated and should emit warning in logs, but the
binding should still work. The warnings can be disabled through the logger configuration, though
the support will be fully removed in the 2.2.0
. The complex scenarios with the custom
RedisInstance
or RedisCaches
have to be migrated right away, there is no fallback binding.
Note: RecoveryPolicy
still uses @Named
as it neither is nor relates to any particular cache.
Dropped implicit InvocationPolicy
from Scala version of the API,
replaced by the instance configuration through the config file.
Introduced configuration property invocation
. It works also with JavaRedis.
For more details, see the updated documentation
#147.
play.cache.AsyncCacheApi
is bound to JavaRedis
instead of DefaultAsyncCacheApi
to fixed value deserialization and support Java HTTP context #140.
Fixed missing binding of play.api.cache.AsyncCacheApi
#135.
Introduced support of Redis Cluster in #84.
Implemented increment in maps #112.
Support of named caches #114
Introduced prefix
configuration property to apply a namespace on all keys in
the cache instance #118.
Simplified RedisCacheModule
and RedisCacheComponents
. Internal components are no longer
published, removed Binder
class, introduced RedisInstanceProvider
instead. Introduced RedisInstanceResolver
and RecoveryPolicyResolver
to provide custom implementations. Introduced RedisCaches
handler
encapsulating all APIs to a single named cache. #122
Created Wiki with more detailed and structured documentation.
Revamped configuration as a consequence of named cache integration #114. Some properties were removed, instance configuration is now more direct, named caches are supported. See Migration Guide for more details.
Introduced InvocationPolicy
implementing Eager
and Lazy
invocation mechanism handling waiting
for the result of the set
operation. Lazy
policy (default) does wait for the result, Eager
does
not wait and ignores it instead #98.
JavaRedis preserves Http.Context
#130.
Introduced support of Redis Cluster in #84.
Implemented increment in maps #112.
Fixed #102, preserved original
exception if extends RedisException
and fixed wrong parameters in error messages
Scredis connector replaced by Rediscala implementation due to repository inactivity, no release management, missing support of cluster, and unreleased support of Scala 2.12.
Due to changes in the connector, there are slightly relaxed constraints
of return values in both CacheApi
and CacheAsyncApi
. For example,
some operations instead of List
return Seq
and instead of Set
also
return Seq
. This change was introduced to avoid possibly unnecessary
collection conversion inside the play-redis
.
Changed return type Unit
in AbstractCacheApi
to akka.Done
with the same meaning but
but better signalizing the intention.
Cross-compiled for Scala 2.11 and Scala 2.12.
Fixed #102, preserved original
exception if extends RedisException
and fixed wrong parameters in error messages
Fixed minor issues #83 and #85.
Implemented RedisCacheComponents
to support compile-time DI
Implemented MGET, MSET and MSETNX redis commands.
Exposed RedisConnector
, it is publicaly available for injection now.
🔗 1.3.0 (Possibly breaking)
Major internal code refactoring, library has been modularized into several packages. However, public API remained unchanged, although its implementation significantly changed.
Implemented Scala wrapper over List API to use Redis Lists.
Implemented Scala wrapper over Set API to use Redis Sets.
Implemented Scala wrapper over Map API to use Redis Hashes.
Added heroku
and heroku-cloud
configuration profiles simplifying running on Heroku.
Introduced RecoveryPolicy
defining behavior when execution fails. Default
policy is log-and-default
. To re-enable previous fail-on-error behavior, set log-and-fail
.
See the RecoveryPolicy
for more details.
Brando connector replaced by scredis implementation due to Brando repository inactivity and major issues (#44). Scredis seems to be efficient, build over Akka and should not contain any major issues as they are not reported.
Play-redis provides native serialization support to basic data types such as String, Int, etc.
However, for other objects including collections, it used to use default JavaSerializer
serializer.
Since Akka 2.4.1, default JavaSerializer
is officially considered inefficient for production use.
Nevertheless, to keep things simple, play-redis still uses this inefficient serializer NOT to enforce any serialization
library to end users. Although, it recommends kryo serializer claiming
great performance and small output stream. Any serialization library can be smoothly connected through Akka
configuration, see the official Akka documentation.
This release is focused on library refactoring. While public API remained unchanged, there are several significant
changes to their implementations. Those are consequences of refactoring some functionality into self-standing
units. For example, there has been extracted RedisConnector
implementing the Redis protocol
and RedisCache
implementing cache API over that. Before, it was tangled together. As consequence, the library has
now layered architecture (facades -> cache implementation -> protocol implementation) with several public facades.
Update to Play 2.5, no significant changes
Redesigned the library from scratch to support Play 2.4.x API and use DI.