cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to use sessionCacheRegion instead of entityCacheRegion for persistedSessions?

Former Member
0 Likes
543

After enabling the persistent session feature we discovered that the persisted sessions are cached in the entityCacheRegion and not in the sessionCacheRegion.

Is there any way to enable the sessionCacheRegion?

Best regards,

Robert

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member

thanks for your answer, we also came along with the same solution and replaced CachedPersistedSessionRepository with our own version. Hybris calculates the wrong cache key

wrong:

     return new Object[] { SESSION, tenantId, sessionId };

correct:

    return new Object[] { sessionId, tenantId, SESSION };

Former Member
0 Likes

Hi Robert,

I have the same issue. I recently opened a ticket at SAP Hybris support. My investigation shows, that the issue is related to cache key calculation in class CachedPersistedSessionRepository, so there is no way to change it by configuration.

I currently try to overwrite the implementation, to use the right region, because we have some memory issues with the usage of entityCacheRegion. The problem is, that you cannot control the amount of cached sessions.

I will update the ticket, if I have some more information from Hybris support.

Regards

Wolfgang