Cache
Introduction
Maravelith provides a unified API for various caching systems. The cache configuration is located in the .env file. In this file you may specify which cache driver you would like used by default throughout your application. Maravelith supports popular caching backends like Memcached and Redis out of the box.
Differences From Maravelith
The Maravel cache drivers utilize the exact same code as the full Maravelith cache drivers. Beyond configuration, there are no differences between using the cache in Maravel and using the cache in Maravelith; therefore, please consult the full Maravelith documentation for usage examples.
Note: Before using the
Cachefacade, be sure you have uncommented the$app->withFacades()method call in yourbootstrap/app.phpfile.
Redis Support
Before using a Redis cache with Maravel, you will need to install the illuminate/redis package via Composer. Then, you should register the Illuminate\Redis\RedisServiceProvider in your bootstrap/app.php file:
$app->register(Illuminate\Redis\RedisServiceProvider::class);
If you have not called $app->withEloquent() in your bootstrap/app.php file, then you should call $app->configure('database'); in the bootstrap/app.php file to ensure the Redis database configuration is properly loaded.