From a8cea1203d961982843e92252ce3fafbadbc4c38 Mon Sep 17 00:00:00 2001 From: hackerESQ Date: Wed, 7 Aug 2024 12:30:33 -0500 Subject: [PATCH] swap to redis driver for queue, cache, and session --- .env.example | 13 ++++++----- composer.json | 1 + composer.lock | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 70 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index 23e3d40..cfb4930 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -APP_NAME=Laravel +APP_NAME=Investbrain APP_ENV=local APP_KEY= APP_DEBUG=true @@ -22,11 +22,11 @@ LOG_LEVEL=debug DB_CONNECTION=sqlite # DB_HOST=127.0.0.1 # DB_PORT=3306 -# DB_DATABASE=tradethink +# DB_DATABASE=investbrain # DB_USERNAME=root # DB_PASSWORD= -SESSION_DRIVER=database +SESSION_DRIVER=redis SESSION_LIFETIME=120 SESSION_ENCRYPT=false SESSION_PATH=/ @@ -34,15 +34,16 @@ SESSION_DOMAIN=null BROADCAST_CONNECTION=log FILESYSTEM_DISK=local -QUEUE_CONNECTION=database +QUEUE_CONNECTION=redis -CACHE_STORE=database +CACHE_STORE=redis CACHE_PREFIX= MEMCACHED_HOST=127.0.0.1 -REDIS_CLIENT=phpredis +REDIS_CLIENT=predis REDIS_HOST=127.0.0.1 +REDIS_PATH=/tmp/database_server.sock REDIS_PASSWORD=null REDIS_PORT=6379 diff --git a/composer.json b/composer.json index de41f53..112ab1e 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,7 @@ "laravel/tinker": "^2.9", "livewire/livewire": "^3.5", "livewire/volt": "^1.6", + "predis/predis": "^2.2", "robsontenorio/mary": "^1.35" }, "require-dev": { diff --git a/composer.lock b/composer.lock index d602024..6958f45 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1a59ab67b8d3eb9ea43e1c0f5cd1ac54", + "content-hash": "75dbf3792262a2f37c90e8a963f8c601", "packages": [ { "name": "bacon/bacon-qr-code", @@ -3410,6 +3410,67 @@ }, "time": "2022-06-13T21:57:56+00:00" }, + { + "name": "predis/predis", + "version": "v2.2.2", + "source": { + "type": "git", + "url": "https://github.com/predis/predis.git", + "reference": "b1d3255ed9ad4d7254f9f9bba386c99f4bb983d1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/predis/predis/zipball/b1d3255ed9ad4d7254f9f9bba386c99f4bb983d1", + "reference": "b1d3255ed9ad4d7254f9f9bba386c99f4bb983d1", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.3", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^8.0 || ~9.4.4" + }, + "suggest": { + "ext-relay": "Faster connection with in-memory caching (>=0.6.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "Predis\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Till Krüss", + "homepage": "https://till.im", + "role": "Maintainer" + } + ], + "description": "A flexible and feature-complete Redis client for PHP.", + "homepage": "http://github.com/predis/predis", + "keywords": [ + "nosql", + "predis", + "redis" + ], + "support": { + "issues": "https://github.com/predis/predis/issues", + "source": "https://github.com/predis/predis/tree/v2.2.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/tillkruss", + "type": "github" + } + ], + "time": "2023-09-13T16:42:03+00:00" + }, { "name": "psr/clock", "version": "1.0.0",