I have a website that allows me to search for lists of content in various ways, for example, "show content created by 523 by date", or "show a list of the last 10 posts."
I use Hibernate for my ORM, and Hibernate provides a cache for objects. However, for lists of objects, like the list of the first page of the most recent content, I don’t understand how best to cache this content. Right now, I have my Spring controllers just returning the standard JSP page, and then I use oscache at the JSP level, wrapped around the call in another class.
It seems inelegant. I really want my controller to have access to the cached result if one of them is available so that the JSP can just show the results.
What are my options here?
source
share