ContextHub SessionStore (AEM 6.1 sp1) | Community
Skip to main content
bmccurdy1
Level 2
September 29, 2016
Solved

ContextHub SessionStore (AEM 6.1 sp1)

  • September 29, 2016
  • 3 replies
  • 2366 views

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.
Best answer by bmccurdy1

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

smacdonald2008
Level 10
September 29, 2016

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

Level 2
August 31, 2017

Can you please share the link for the solution here

bmccurdy1
bmccurdy1AuthorAccepted solution
Level 2
August 31, 2017

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