public function cacheRoutes()
{
// routes are not enabled, so we should not
// cache. furthermore we should disable the
// laravel cache and clear the devise routes
// file if it exists
if (!$this->Config->get('devise.routes.enabled')) {
$this->clearLaravelCache();
$this->clearDeviseRoutes();
return false;
}
$routeCachePath = $this->Config->get('devise.routes.cache');
$routes = $this->findDvsPageRoutes();
$routesAsString = $this->View->make('devise::layouts.routes', ['routes' => $routes])->render();
$this->File->put($routeCachePath, $routesAsString);
$this->Artisan->call('route:cache');
return true;
}