This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Menus caching in struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Menus caching in struts 2" Watch "Menus caching in struts 2" New topic
Author

Menus caching in struts 2

Abhilash Chander
Ranch Hand

Joined: Oct 18, 2009
Posts: 39
Hi, I'm developing a website in struts 2. I have horizontal menus at the top and they are displayed on every page. So evertime a user goes to a new page, the menus are fetched from the database. I dont want my applicaton to fetch menus from database for each request. Is there a way to cache my menus somewhere, so i can save time of fetching them from the database. Thanks in advacne
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Lots of options. You could keep the menus in the application context. If they're user-specific they could be in the session context. You could cache in the DB layer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Menus caching in struts 2