I want to update the
thread as I figured out the answer to this question. As it turns out, when you use the RequestMapping annotation, the method that is assigned as the "RequestMapper" can actually take in a parameter that represents the HttpSession. Essentially, the signature of the method would look something like this:
One then can set attributes into the HttpSession which then acts as a cache for a particular user. I honestly feel awkward using the session as a cache. Does anyone have an idea of better caching strategies? One idea that originally crossed my mind from prior experience was to cache these variables in the service layer. However, this presents an issue since spring treats services as singletons: you end up with concurrency issues with this approach. Any input / advice would be greatly appreciated.
Thanks!
Anthony