Annotation Type Cacheable


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface Cacheable
    This annotation is applied to methods that may have their results cached using a Java dynamic proxy instance.

    @see CachingProxy

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int duration
      The duration amount of the entries after they are written to the result cache
      java.lang.Class<? extends CachingProxy.KeyGenerator> keyGeneratorClass
      The class used to generate keys for entries in the result cache
      int maximumSize
      The maximum size of the result cache before entries are evicted
      java.time.temporal.ChronoUnit unit
      The duration unit of the entries after they are written to to the result cache
    • Element Detail

      • maximumSize

        int maximumSize
        The maximum size of the result cache before entries are evicted
        Returns:
        the maximum size
        Default:
        128
      • duration

        int duration
        The duration amount of the entries after they are written to the result cache
        Returns:
        the duration
        Default:
        1
      • unit

        java.time.temporal.ChronoUnit unit
        The duration unit of the entries after they are written to to the result cache
        Returns:
        the duration unit
        Default:
        java.time.temporal.ChronoUnit.HOURS
      • keyGeneratorClass

        java.lang.Class<? extends CachingProxy.KeyGenerator> keyGeneratorClass
        The class used to generate keys for entries in the result cache
        Returns:
        the key generator class
        Default:
        org.linuxforhealth.fhir.cache.CachingProxy.KeyGenerator.class