-
Oct 20th, 2009, 04:08 PM
#1
make setCacheSeconds to work
Hi,
I created a simple controller extends from AbstractController. Bellow is my implementation. The caches doesn't seem to work at all.
Please help
@Override
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
throws Exception {
this.setCacheSeconds(10);
DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
String now = dateFormat.format(new Date());
logger.info("returning hello view with " + now);
Map<String, Object> myModel = new HashMap<String, Object>();
myModel.put("now", now);
myModel.put("products", this.productManager.getProducts());
return new ModelAndView("hello", "model", myModel);
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules