Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
erp5 erp5
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 140
    • Merge requests 140
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !1451

Merged
Created Jun 23, 2021 by Jérome Perrin@jeromeOwner

Use Distributed Cache for Session

  • Overview 2
  • Commits 8
  • Pipelines 11
  • Changes 14

Until now, portal_sessions was only reliably usable when using a family with only one zope node, because the session data was using RAM cache. When used by authenticated users it was more or less usable, because of haproxy sticky cookie that we set for authenticated users, but for non authenticated users this was basically unusable. This was especially a problem for CaptchaField, for which users are generally not authenticated.

This changes portal_sessions to use a distributed cache, which brings several differences:

  • sessions are now shared between all zopes of a cluster.
  • storing ERP5 temp documents is still possible, but modifying a temp document in session does not automatically save the changes in session, for next session read to be using the modified document it's required to save the document explicitly.
  • session respects transaction semantics, changes are only persisted in session when transaction commits successfully.
  • portal_caches.clearAllCaches API no longer clear all sessions.
Edited Jun 25, 2021 by Jérome Perrin
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: feat/portal_sessions_memcached
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7