ContextHub SessionStore (AEM 6.1 sp1) | Community
Skip to main content
bmccurdy1
Level 2
Sep 29, 2016 4:36 PM UTC
Solved

ContextHub SessionStore (AEM 6.1 sp1)

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
bmccurdy1
bmccurdy1Accepted solution
Level 2
Aug 31, 2017 11:28 AM UTC

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});

3 replies

bmccurdy1
bmccurdy1AuthorAccepted solution
Level 2
Aug 31, 2017 11:28 AM UTC

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});

Translate
Level 2
Aug 31, 2017 8:52 AM UTC

Can you please share the link for the solution here

Translate
smacdonald2008
Level 10
Sep 29, 2016 5:14 PM UTC

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

Translate