Overview of play-redis APIs
masterThe library provides multiple API implementations depending on your language (Scala or Java) and whether you require blocking or non-blocking operations.
- Advanced APIs: Provide extended Redis-specific operations (e.g.,
expire,exists,invalidate, collection support). - Basic APIs: Implement the standard Play
cacheApiinterfaces.
While the core implementation is built on Pekko actors and is fully non-blocking, many provided facades are blocking wrappers for ease of use.
| | Trait | Language | Blocking | Features |
| -- | ------------------------------------ | :------: | :----------: | :------: |
| 1. | `play.api.cache.redis.CacheApi` | Scala | *blocking* | advanced |
| 2. | `play.api.cache.redis.CacheAsyncApi` | Scala | non-blocking | advanced |
| 3. | `play.cache.redis.AsyncCacheApi` | Java | non-blocking | advanced |
| 4. | `play.api.cache.SyncCacheApi` | Scala | *blocking* | basic |
| 5. | `play.api.cache.AsyncCacheApi` | Scala | non-blocking | basic |
| 6. | `play.cache.SyncCacheApi` | Java | *blocking* | basic |
| 7. | `play.cache.AsyncCacheApi` | Java | non-blocking | basic |