-
-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
issue: feature requestIssue suggesting a new featureIssue suggesting a new featureseverity: mediumsource: plugin
Description
Effectively the way this would be implemented is we would check for the Authorization header of the request
Depending on how the user configures the content-type (this won't be enabled by default or when using the contentTypes array option in the strategy) would be like so:
- If the user configures the API to cache at the user level: then we create a specific cache key for the user which includes their user ID as part of the key prefix
- If the user configures the API to cache at the role level: then we create a specific cache key for the role which includes the role ID as part of the key prefix
- Public requests will not use either user/role cache response
- Authenticated requests will not use the public cache response
- role/user cannot both be enabled, it'll be one or the other
- You will be able to cache public and authenticated but their cache keys won't be shared
Example cache key structure: keyv:{{ custom prefix if enabled }}{{user[id] OR role[id]}}:restOfTheNormalKey
Metadata
Metadata
Assignees
Labels
issue: feature requestIssue suggesting a new featureIssue suggesting a new featureseverity: mediumsource: plugin