Giter VIP home page Giter VIP logo

Comments (10)

abdumu avatar abdumu commented on August 22, 2024 2

I think we should give the user the ability to set a different redis connection in laravel-visits config.

'redis' => [

    ....

    //custom connection
    'laravel-visits' => [
        'host' => env('REDIS_HOST', 'localhost'),
        'password' => env('REDIS_PASSWORD', null),
        'port' => env('REDIS_PORT', 6379),
        'database' => 1, // anything from 1 to 15, except 0 (or what is set in default)
    ],

    ....

],

and in laravel-visits config

'redis_connection' => null, // can be set to a custom connection, or `null` for default

from laravel-visits.

BSN4 avatar BSN4 commented on August 22, 2024 1

@summerblue awesome, Thanks ! .. I have made a few more changes.. check the latest commits ..

can you please try the updated version ?

from laravel-visits.

abdumu avatar abdumu commented on August 22, 2024 1

@adriaanzon good catch. but still for me I think the documentation should stay as a warning because default Redis database still get flushed sometimes. and we should introduce a change like:

- database => 3,
+ database => env('REDIS_DB', 3),

from laravel-visits.

BSN4 avatar BSN4 commented on August 22, 2024

I'm sorry but this not possible we are using redis and artisan cache:clear doesn't clear your redis storage

from laravel-visits.

summerblue avatar summerblue commented on August 22, 2024

@if4lcon Sorry, there is something I missed, u have to set your default cache driver to redis at the config/cache.php file.

from laravel-visits.

BSN4 avatar BSN4 commented on August 22, 2024

@summerblue how do you suggest fixing this issue ?

from laravel-visits.

summerblue avatar summerblue commented on August 22, 2024

@abdumu That would be wonderful!

from laravel-visits.

BSN4 avatar BSN4 commented on August 22, 2024

@summerblue can you try this commit and confirm if is resolve this issue ?

from laravel-visits.

summerblue avatar summerblue commented on August 22, 2024

@if4lcon Tested, works perfect. I also put two comments in the commit d7ff826 u should see it, and please put out a new release when u are done. I am waiting for the new release to fix the production code. Thanks a lot.

from laravel-visits.

adriaanzon avatar adriaanzon commented on August 22, 2024

I wonder if it should still be documented this way at https://awssat.com/opensource/laravel-visits/3_installation.html#redis-configuration, because this PR introduced a separate Redis database to store cache items by default.

from laravel-visits.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.