Skip to content

Model ->refresh doesn't purge JsonModelAttributeCache #16

Description

@jwadhams

The vast majority of our unit tests use $model = $model->fresh() which creates a brand new instance of the Model object in memory, all caches are by definition reset. The Laravel method $model->refresh() superficially looks the same but it's zeroing out all the caches base Laravel knows about, and doesn't catch our new $jsonModelAttributeCache.

Add support in HasJsonModelAttributes to empty $jsonModelAttributeCache during ->refresh()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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