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

Different structure of data returned for JSON ($role->toJSON()) after cache expire #262

Open
apuatcfbd opened this issue Mar 5, 2021 · 1 comment

Comments

@apuatcfbd
Copy link

apuatcfbd commented Mar 5, 2021

I'm talking about JSON output/print
When cache is active, it return like the following for $role->getPermissions()

{
     role_name: {
         update: true
     },
     ...
}

but after the cache time exceeds, 1st response returns whole result set like:

[
	{
		"id":2,
		"inherit_id":null,
		"name":"role_name",
		"slug":{
			"update":true
		},
		"description":"Post can be edited",
		"created_at":"2021-03-03T12:02:43.000000Z",
		"updated_at":"2021-03-03T12:02:43.000000Z",
		"pivot":{
			...
		}
	},
	...
]

In config file I've 'cacheMinutes' => 1 & I get this type of data change every 1 minute.
Hope this explanation will be enough to reproduce the issue.

This makes working with this hard.

@kodeine
Copy link
Owner

kodeine commented Oct 24, 2021

i'm actually traveling and cannot test this, can you please submit a PR if you were able to find a fix?

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

No branches or pull requests

2 participants