简体   繁体   中英

Grails 4.0.3 cache plugin - clearAtStratup doesn't work

I've installed lately grails cache plugin in my grails 4.0.3 application.

compile 'org.grails.plugins:cache'

I'm trying to config this to NOT clear once generated caches at application restart. This is default behavior according to the docs

My application.yml contains this part:

grails:
  cache:
    enabled: true

but every time I restart my application (moving war file) caches seems to clear. I did try to put clearAtStartup flag in my config - didn't help.

Any help would be appreciated. Thanks in advance.

It looks like you are using the default in memory cache implementation. Since the cache is only in memory, when the application restarts the cache won't survive because the cache data is only in volatile ram.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM