AEM 6.1 - Store data in session -


in our aem instance getting data external system, per user data same during session. make sense store data in session / cache or that. cms used before stored such data in session. right solution here aem 6.1 or there better alternatives?

call 1 needs stored: size in bytes: 34597 call 2 needs stored: size in bytes: 2201

thanks response.

i can think of 3 solutions..

  1. get data session java class, create pojo, , build object of pojo data in session. serialize pojo , save in browser's cookie. while retrieving it, can de-serialize , use on form or in java code. have see how big of object becomes data comes. cookies have 4kb limit on size.

  2. if can use angular(or jquery), can save session "html5 localstorage" , retrieve manipulate , display on form or send webservice. advantage localstorage has bigger capacity(5mb) , modern browsers support it. drawback cannot access locastorage java (server-side). have attached screenshot browser storage options show when press "ctrl + i" on chrome. enter image description here

  3. save session data aem repository , manage there (add data, remove, read etc.)

i have implemented each of above , let me know if need examples.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -