Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor cache logic #567

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Refactor cache logic #567

wants to merge 1 commit into from

Conversation

danschultzer
Copy link
Collaborator

@danschultzer danschultzer commented Sep 20, 2020

Initial work towards a refactor of cache logic

The first step was to move invalidation of existing active sessions to the Pow.Plug.Session module. It doesn't seem right that Pow.Store.CredentialsCache should know about :fingerprint.

Next steps:


Before using erlang match spec, the keys where just binary name spaced values. It was necessary to create three records to pull in all sessions for a user or all users for the sessions. With the match spec I believe that it might be possible to change Pow.Store.CredentialsCache to only use one query to fetch session, sessions for a user, and users for all sessions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Delete all sessions when calling Pow.Plug.delete_user/2
1 participant