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

How can i retrieve cache variable from multi-domain #94

Open
devpaulopaixao opened this issue May 23, 2023 · 3 comments
Open

How can i retrieve cache variable from multi-domain #94

devpaulopaixao opened this issue May 23, 2023 · 3 comments

Comments

@devpaulopaixao
Copy link

I have two domains, they are admin.site.com.br and user.site.com.br.
I need to get from cache the variable user-is-online concatenated with auth user id. But, this just works for the first domain, not for the second when use cache()->get('user-is-online' . auth()->user()->id). Any solution?

@gecche
Copy link
Owner

gecche commented May 23, 2023

Hi,

I need some more info for trying to help you, but I don't think that the problem is the concatenation.
Which version of the package do you use? Which driver do you use for the cache?

Cheers

Giacomo

@devpaulopaixao
Copy link
Author

devpaulopaixao commented May 23, 2023

At the moment, i use version 4.0 with default cache driver(file).

@gecche
Copy link
Owner

gecche commented May 24, 2023

I will try to do some test asap... however your problem sounds a bit strange because using the standard file driver, the cache files should be completely separated and it always worked for me.
You should have in your folder structure
storage/admin.site.com.br/framework/cache and
storage/user.site.com.br/framework/cache
Can you check you have this structure?
Second question: could you share more about the code where you are retrieving the cache variable? Are you using it in a job/commnad or via web?

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