Skip to content

Commit

Permalink
static and dynamic producer doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cen1 committed Oct 25, 2019
1 parent d7d72c4 commit d52851c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,24 @@ Used either to bulk fill cache from external source or for read-through operatio

## Cache CDI producer example

### Static configuration

```java
public class CacheProducer {
@Inject
private CacheManager cacheManager;
@Produces
@ApplicationScoped
public Cache<String, String> createCache() {
return cacheManager.getCache("default");
}
}
```

### Dynamic configuration

```java
public class CacheProducer {
Expand Down

0 comments on commit d52851c

Please sign in to comment.