I have an application who has different interface for different role
I want to cache the application and update it if the user change his role
example :
Role user --> www.sample.com/index.jsp (user version)
Role admin --> www.sample.com/index.jsp (admin version)
Case 1 : if the user1 access to www.sample.com/index.jsp with Role User and his previous connection was with the Role User ---> use the cached version
Case 2 : if the user1 access to www.sample.com/index.jsp with Role Admin and his previous connection was with the Role User ---> update cache
I am using jquery mobile, html 5 , Java/Spring