We want to store temporary data for a user session, and make it available when navigating between pages.
jQuery.ajax(...) will be used to retrieve the information.
What is best practice for managing temporary (session) data in cq? Eg:
- Can client context be used for this purpose?
- Should the information be stored in temporary nodes in jcr content?
- Should the information be stored as session scoped request attributes?
1. For storing temporary session data i think that is the correct choice (using clickstreamcloud). There are various default storage comes OOTB (http://dev.day.com/docs/en/cq/current/developing/client_context_detail .html) but you have to check as per your requirement.
If you want to store user session data separately then you can create your own store either referhttp://dev.day.com/docs/en/cq/current/developing/client_context_detail .html
look at "/libs/cq/personalization/clientlib/source/clickstreamcloud" refer (pagedata, sitedata which simpler than to others) and use "PersistedSessionStore" instead of "SessionStore" because you want data to be accessible throuhout the pages. Once you create your own store, you have to register it with clickstreamcould most probably in "/libs/cq/personalization/clientlib/source/shared/clientcontextmanage r.js" because the structure has been changed from 5.4 to 5.5.
2. Not sure if it manages nodes somewher in /tmp or not but as i know it has store which is like collection objects a client side.
3. I think you can go with option 1 based on above requirement.
Please let me know if you need more information.