• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Menus caching in struts 2

 
Abhilash Chander
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic