Spring 4 support for Caffeine Cache - spring

I was trying to find some examples and evidence if Spring 4.0.3 version support caffeine cache integration? If yes, what caffeine cache version is supported for Spring 4.0.3?

Support was added in Spring Framework 4.3 and in Spring Boot 1.4. Previously you could use the Guava provider, which was the baseline for Caffeine's. That will likely be a good approach until you are ready to upgrade. If you really need to use Caffeine for performance reasons then you might try this alternative integration.

Related

Which version of Spring framework security is compatible with Spring framework 5.3.4

Currently, I am using
<springFramework.version>3.2.3.RELEASE</springFramework.version>
<springFrameworkSecurity.version>3.1.4.RELEASE</springFrameworkSecurity.version>
I want to move to
<springFramework.version>5.3.4.RELEASE</springFramework.version>
<springFrameworkSecurity.version> ? </springFrameworkSecurity.version>
According to the documentation for the latest Spring Security:
Since Spring Security makes breaking changes only in major releases, it is safe to use a newer version of Spring Security with Spring Boot.
The Spring Framework version you're moving to is 5.3.4, so I would assume that any 5.X.X version of Spring Security should work.
If that works, let us know by marking the answer as solved! If not, leave a comment.

Difference between Caching options provided by Spring Boot and Resilience4j cache

Resilience4j version: 1.2.0
Java version: 1.8
Problem description:
I am trying to explore different patterns provided by resilience4j. I am trying to stick to annotations vs functional programming. But when it comes to resilience4j cahce, I am bit confused, as I couldn't find an working example of the same. I was able successfully try out other patterns.
My confusion is around spring boot cache and resilience4j cache. Are they same or functionally different? Can I use them interchangingly? Is there any github repository giving an usecase and explanation for the resilience4j cache? Any input is highly appreciated.
I got an response from the author Robert Winkler on github, who wrote Resiliance4j-cache component. Below is his resonse.
RobWin:
Hi,
You can stick with Spring Caching Abstraction and Annotations.
Resilience4j-cache is currently not part of the Spring Boot starter and there are no plans to add it.
Resilience4j-cache was created by me when I had to use JCache API and Hazelcast and I wanted to protect my application from runtime exception which were thrown by Hazelcast.

Why is GuavaCacheConfiguration deprecated in Spring Boot 1.5.3?

I was thinking about replacing custom Guava cache configuration with AutoConfiguration... but found that the latter one is deprecated already.
Tried searching in Spring Boot documentation and GitHub repo, but has not found a clear answer. It's just deprecated in stable version and removed in master.
I respect (and use) both Spring Boot & Guava, so I'd like to understand the reason of this change.
Search for "Guava" in Spring Boot features - Caching and it says that should use Caffeine instead:
Caffeine is a Java 8 rewrite of Guava’s cache and will supersede the
Guava support in Spring Boot 2.0.
It's basically Guava cache on steroids (it has similar interface), so the switch should be straightforward.

JCache with EHCache implementation

Does EHCache implemenation of JCache supports Distributed caching feature?
My requirement is Distributed Client-Server Cache: Multiple cache (clustered) nodes, collaborating in a distributed fashion and executing in isolation from the client application.
Thanks
Note: I am a developer working on Ehcache
Ehcache, depending on version, has two different ways it is integrated with JSR-107 / JCache:
Version 2.x needs the ehcache-jcache wrapper
Version 3, under active development, is a native implementation of it.
In both cases, while using the JSR-107 / JCache API in your application, you can benefit from the whole set of options available to native Ehcache. This includes the clustering support:
It is available with Ehcache 2.10.1 and Terracotta 4.3.1 today
It will be included in Ehcache 3. It has been released and is available with Ehcache 3.1 and above.

How long will Spring 3.x continue to be supported?

I've recently inherited a project that's built on some older technologies, including iBATIS 2.x, and Struts 1.x. Both of those seem to be supported (though #Deprecated) in Spring 3.2.x, and not at all in Spring 4.x:
org.springframework.orm.ibatis, Object Relational Mapping (ORM) Data Access - iBATIS SQL Maps
org.springframework.web.struts, Integrating with other web frameworks - Apache Struts 1.x and 2.x
However, before I start the effort of migrating to Spring 3, I want to know how much longer I can expect to see it supported by the upstream developers. Would I have enough time to keep running Spring 3 while I migrate other parts of my application to newer tools, and then finally migrate over to Spring 4? Or should I focus on upgrading all of these other things before I can get onto Spring?
I hardly understand your problem. iBATIS 2.x and Struts 1.x are both no longer supported. They can work fine, as does Spring 2.x, but if a security problem is discovered, it will not be fixed.
If you contemplate migrating to Spring 3.x, you should also contemplate the migration to MyBatis and Struts 2.x (or Spring MVC ?) unless you have special requirements.
BTW, Spring 3.0 and 3.1 series are no longer supported either, and support for 3.2 should end when 4.2 will reach General Availability status, as Spring Framework generally offers support for current version, and the 2 previous (legacy) ones.
Spring 3.X will be end-of-life as of Dec 31 2016, but there will only be maintenance releases until that time (no feature development will happen).
I just work on project that uses Spring 4 with MyBatis. There is project MyBatis-Spring that integrates these two. Works like charm.
Don't know how to help with second bullet, cause we are using Spring MVC.
Seems that they've just posted a blog post that includes clarification on this topic:
Furthermore, please note that the 3.2.x line - and therefore the
entire 3.x generation - is approaching its end of life in 2015. We are
still committed to basic maintenance for critical issues; however,
don’t expect more than two or three further 3.2.x releases down the
road.
Source: Spring Framework 4.1.4 & 4.0.9 & 3.2.13 released
So, it seems that I'd have at least a few months of 3.x being supported to work on transitioning everything.
For my current project I'm required to use Struts 1.2.4. But I also wanted to utilize Spring 4.1.x.
To compensate for the missing Struts support since Spring 4, I copied the code from the spring-struts 3.2.13 package and created a Spring 4.1.5 compatible spring-struts-forwardport package.
Obviously this is not the most elegant solution, but maybe this can help you solve your problem.
I guess this package will also work with the next Spring 4.1 releases.

Resources