jsr107 / jsr107spec

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

How to declare expiry policy in annotation usage #332

Closed rahmanusta closed 8 years ago

rahmanusta commented 8 years ago

Is there any way to declare cache expiry policy while using JCache annotations?

cruftex commented 8 years ago

Hi Rahman,

unfortunately this isn't part of the JCache spec.

To do it in a standard compatible way, applications need to use the CompleteConfiguration class for this.

gregrluck commented 8 years ago

An class annotated with JCache annotations is an idiom for using an existing cache,not a way to configure one.

There are two ways to configure caches:

  1. Programmatically - JCache provides this for configuration options it cares about
  2. Declaratively - this is the responsibility of the implementation
rahmanusta commented 7 years ago

I think it could be in the spec.