Every entity class has user.id value, I have filters on all services which filters data by principal.id and entity user.id on database level, simply adds where clause. I started to using @Cacheable spring option. But filters not works with spring-cache. How can I filter data from cache ?
@Override
@Cacheable(value = "countries")
public List<Country> getAll() {
return countryDao.findAll();
}
Different user has access to values other users if values are in cache.
Aucun commentaire:
Enregistrer un commentaire