Skip to content

Cache context based on record #930

@NuckChorris

Description

@NuckChorris

We allow access to certain fields on the user (email, etc.) only if context[:current_user] == record but this can't currently be used with caching in any reasonable manner.

For now I'm just caching a copy for each user who sees it, but that's absurd and definitely not what we need. Is there a better solution, or would it be possible to get the record inside Resource.attribute_caching_context(context)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions