Cache
There are two ways to enable caching for target entities.
Configuration
Specify their class names using the doyto.query.caches
property in the application.yaml
file:
doyto:
query:
caches: UserEntity, MenuEntity
Programmatic
Override method getCacheName()
in AbstractDynamicService
:
public class UserService extends AbstractCrudService<UserEntity, Integer, UserQuery> {
@Override
protected String getCacheName() {
return "module:user"; // return any string except UserEntity
}
}
Last updated
Was this helpful?