config/src/main/java/org/springframework/security/config/annotation/web/configurers/ExceptionHandlingConfigurer.java
private RequestCache getRequestCache(H http) {
		RequestCache result = http.getSharedObject(RequestCache.class);
		if (result != null) {
			return result;
		}
		return new HttpSessionRequestCache();
	}
private RequestCache getRequestCache(H http) {
		RequestCache result = http.getSharedObject(RequestCache.class);
		if (result != null) {
			return result;
		}
		return new HttpSessionRequestCache();
	}
Gets the {@link RequestCache} to use. If one is defined using
{@link #requestCache(org.springframework.security.web.savedrequest.RequestCache)},
then it is used. Otherwise, an attempt to find a {@link RequestCache} shared object
is made. If that fails, an {@link HttpSessionRequestCache} is used

@param http the {@link HttpSecurity} to attempt to fined the shared object
@return the {@link RequestCache} to use