I would like to make some contributions.

Current spring framework is based on JDK8. So, CaffeineCacheManager.getCache() method can be simplified with Map.computeIfAbsent

Thank you.

Comment From: pivotal-issuemaster

@bananayong Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Comment From: pivotal-issuemaster

@bananayong Thank you for signing the Contributor License Agreement!

Comment From: sbrannen

Thanks for the PR!

I ended up implementing this slightly differently in 16e49bf0c92f9387ccf10426f77ba3b02f4c24fb.

Comment From: bananayong

Thank you to reflect my contribution. It looks simpler!

But, I would like to give an opinion.

cacheName -> this.dynamic ? createCaffeineCache(cacheName) : null

This lambda expression accesses this.dynamic member field. It causes capturing variable. getCache method will create new lambda instance whenever called. It can be avoided if this.dynamic is checked outside lambda.

Please, ignore this comment if there is no big benefits. Thank you!