Skip to content

Conversation

danschultzer
Copy link
Member

@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