| Ultimately I believe the disconnect comes down to the following requirements:
- A region-name can be used multiple times, even for different types. Personally I feel like its bad to allow mixing transactional data (entity, natural-id and collection) with non-transactional (query, update-timestamps) in the same region; but that may be a largely arbitrary distinction.
- A Region can host multiple "access strategies"
In other words these are all valid caching set ups:
@Entity
@Immutable
@Cacheable
@Cache( region="a.b.c", usage=READ_ONLY )
@NaturalIdCache( region="a.b.c", usage=READ_ONLY )
class SomeEntity {
...
}
@Entity
@Cacheable
@Cache( region="a.b.c", usage=TRANSACTIONAL )
class AnotherEntity {
...
@Cache( region="a.b.c", usage=TRANSACTIONAL )
Collection someCollection;
}
So we have a single region here named "a.b.c" holding entity, natural-id and collection data with varying concurrent access handling. Do you both agree that, with or without Chris Dennis's change, those requirements can be achieved? |