Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

ContextHub SessionStore (AEM 6.1 sp1)

Avatar

Level 2

We are implementing a custom data store in AEM 6.1 ContextHub for a client's site and trying to use the SessionStore. According to the Adobe documentation, the SessionStore should use the in-memory persistence and only be available for that browser session. Our custom store inherits from the SessionStore:

ContextHub.Utils.inheritance.inherit(myStore, ContextHub.Store.SessionStore);

Our store is registered and available to the developers to read/write data. However, upon further inspection, it appears the custom store is using the HTML5 local persisted storage and not the session storage. Data is being stored clientside and persisted far longer than the browser session.

Looking at all the ContextHub stores, examples and custom, they all appear to be using the default Local persistence. Is there a configuration missing, a variable that should be set, or something I am overlooking to get our custom store to use the in-memory session store? Or are we looking at a bug in AEM 6.1?

1 Accepted Solution

Avatar

Correct answer by
Level 2

We eventually reached out to DayCare, and while we did not get a reference to proper documentation, below is what was suggested from DayCare, which ultimately resolved our issue.

this.persistence = new ContextHub.Utils.Persistence({mode : ContextHub.Utils.Persistence.Modes.SESSION});

View solution in original post

3 Replies

Avatar

Level 10

I am checking into this - it should be as documented. 

Avatar

Level 2

Can you please share the link for the solution here

Avatar

Correct answer by
Level 2

We eventually reached out to DayCare, and while we did not get a reference to proper documentation, below is what was suggested from DayCare, which ultimately resolved our issue.

this.persistence = new ContextHub.Utils.Persistence({mode : ContextHub.Utils.Persistence.Modes.SESSION});