swayok / alternative-laravel-cache

Replacements for Laravel's redis and file cache stores that properly implement tagging idea
MIT License
169 stars 26 forks source link

Package connects with PHP-Redis (or both) at the start due to call to ->getWrappedConnection() #47

Closed genesiscz closed 1 year ago

genesiscz commented 1 year ago

This line tries to setLogger but what it does is also trying to connect to the redis instance.

That is problematic for obvious reasons (phpstan that runs native while project being in Docker trying to connect every time I make a change in the code), but also unnecessary connects when it doesn't need to.

I moved the setLogger call into getWrappedConnection() and it is working flawlesly now.

genesiscz commented 1 year ago

THAT WAS FAST 👍 Thank you 💯

https://github.com/swayok/alternative-laravel-cache/commit/9052a1fe6fac43683d105cb03b26c4ec11e6ace8

swayok commented 1 year ago

@genesiscz Fixed in 6.1.13. Test it for you situation to be sure it works correctly.

genesiscz commented 1 year ago

Yes, it does 🥇

genesiscz commented 1 year ago

@swayok great work btw, I hated Laravel tags and love yours ! THANK YOU