> For the complete documentation index, see [llms.txt](https://bernardo.gitbook.io/development-docs-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bernardo.gitbook.io/development-docs-java/spring-cache/configuration.md).

# Configuration

## Method Configuration

```java
@Cacheable("employees")
public Iterable<N> readEmployees(final Short code, final Short company, final Pageable pageable);
```

## Custom Key

```java
@Cacheable(cacheNames = "employees", key = "{ #root.methodName, #code, #company }")
public Iterable<N> readEmployees(final Short code, final Short company, final Pageable pageable);
```

## Registration

Any named cache should be registered, for example in an ehcache configuration file.
