I want to cache an dto, that I get consuming an api, in the whole request. I try to access the request variable in a service, but it don’t work.
Also I had tried to create a service with request scope but it has a error in bean creation stage in spring.
Some thing like this: http://jira.codehaus.org/browse/GRAILS-4148
Can you give me any pointer?
You are free to pass request variable to any service method as parameter.
You have 2 cache solution:
P.S. I’m not a big expert in EhCache + Grails bundle but on my opinion – SprigCache is much more flexible (adjustable) than EhCache but those two providers have very different use purposes. And keep in mind that SpringCache is based on EhCache 🙂