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

CACHE_DRIVER as Database Returns Call to a member function beginTransaction() on null #1865

Closed
murugesh-smp opened this issue Nov 2, 2019 · 2 comments
Assignees
Labels

Comments

@murugesh-smp
Copy link

Hi All,

changing CACHE_DRIVER as database we are getting "Call to a member function beginTransaction() on null". i want to know that laravel-mongodb supports CACHE_DRIVER as database or not.

Is there any way we can achieve this.

Reason why we are using Database as CACHE_DRIVER.
We are hosting the app in cluster mode. that means we are running 2 parallel application running under LOAD_BALANCER. In this case, while running a Cron or Scheduler: sometimes it's running twice. that because of the CACHE_DRIVER is in file mode. so it's working along its Individual CACHE files.

My Cache.php config are

'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => 'mongodb',
],

And in .env
CACHE_DRIVER=database

any hint or help will be appreciated.

Many Thanks.

@Smolevich
Copy link
Contributor

@murugesh-smp, show test code for reproducing problem

@divine divine linked a pull request Feb 16, 2020 that will close this issue
@GromNaN
Copy link
Member

GromNaN commented Apr 22, 2024

New mongodb cache driver introduced by #2877

@GromNaN GromNaN closed this as completed Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants