Is it possible to set a different specification per cache using caffeine in spring boot?

后端 未结 3 512
Happy的楠姐
Happy的楠姐 2021-02-02 10:03

I have a simple sprint boot application using spring boot 1.5.11.RELEASE with @EnableCaching on the Application Configuration class.

3条回答
  •  后悔当初
    2021-02-02 10:19

    I converted my initial PR into a separate tiny project.

    To start using it just add the latest dependency from Maven Central:

    
        io.github.stepio.coffee-boots
        coffee-boots
        2.0.0
    
    

    Format of properties is the following:

    coffee-boots.cache.spec.myCache=maximumSize=100000,expireAfterWrite=1m
    

    If no specific configuration is defined, CacheManager defaults to Spring's behavior.

提交回复
热议问题