snowsoft / laravelmongodbcache
A MongoDB cache driver for Laravel
dev-master
2020-12-26 22:19 UTC
Requires
- php: >=7.3.0
- illuminate/cache: ^5.5|^6.0|^7.0|^8.0|^9.0
- jenssegers/mongodb: ^3.3|^3.4|^3.5|^3.6|^3.7|^3.8
Suggests
- jenssegers/mongodb-sentry: Add Sentry support to Laravel-MongoDB
- jenssegers/mongodb-session: Add MongoDB session support to Laravel-MongoDB
This package is auto-updated.
Last update: 2024-12-27 07:04:53 UTC
README
A MongoDB cache driver for Laravel
Installation
Make sure you have jenssegers\mongodb installed before you continue.
Install using composer:
composer require snowsoft/laravel-mongodb-cache
Add the session service provider in app/config/app.php
:
'Nlk\Mongodb\Cache\MongoCacheServiceProvider::class',
Add mongodb cache store in app/config/cache.php
'stores' => [
/...
'mongodb' => [
'driver' => 'mongodb',
'table' => 'cache',
'connection' => null,
],
],
Update your .env file and change the CACHE_DRIVER
to mongodb
CACHE_DRIVER=mongodb