G
G
Gregory Kaplan2017-06-30 21:00:48
Design patterns
Gregory Kaplan, 2017-06-30 21:00:48

MVC and caching, how would it be more correct?

Good evening, please help me understand. I want to move the work with the cache from the controller, now I have a module in the controllers / concerns folder in which I placed the keys for redis. But I don't like the way it looks.. not very pretty. Can someone tell me how to make it more beautiful / more correct?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2017-07-01
@sergey-gornostaev

In Spring MVC, you simply mark the method whose output needs to be cached with the @Cacheable annotation . It's beautiful and right.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question