jsr107 / jsr107spec

JSR107 Cache Specification
Apache License 2.0
413 stars 164 forks source link

Java EE support and cache configuration #393

Open cruftex opened 6 years ago

cruftex commented 6 years ago

Originally JCache was meant to be included in the Java EE spec canon. When working on a next version of JCache that requirement is probably one of the "most wanted". Looking at the efforts so far I see a major conceptual problem:

a) The JCache spec says that the cache configuration is outside of the spec b) An EE application should run on an EE server. If the application uses JCache for caching, there must be enough configuration information that is independent of the cache vendor to run the application

Solutions variants I can think of at the moment:

  1. no extra configuration. specify that a default cache should hold at least 1000 elements.
  2. standard configuration file that enlists the used caches in the application and parameters that are known in the JCache configuration object. Also it contains a description of the intended use, so an admin can configure a specific implementation properly.
  3. instead of naming the caches, introduce labels. this should allow the admin to set a vendor specific cache configuration of a group of caches with the same label.