Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure isCachable in checkCooldownAndFlushAfterPersisting #458

Merged
merged 1 commit into from
Mar 2, 2024

Conversation

KieranFYI
Copy link
Contributor

When MODEL_CACHE_ENABLED is set to false, checkCooldownAndFlushAfterPersisting is still running logic which opens a cache connection.

[2024-02-25 04:34:58] local.ERROR: No connection could be made because the target machine actively refused it {"exception":"[object] (RedisException(code: 0): No connection could be made because the target machine actively refused it at \\vendor\\laravel\\framework\\src\\Illuminate\\Redis\\Connectors\\PhpRedisConnector.php:159) [stacktrace] #0 \\vendor\\laravel\\framework\\src\\Illuminate\\Redis\\Connectors\\PhpRedisConnector.php(159): Redis->connect('127.0.0.1', '6379', 0.0, NULL, 0, 0.0) #1 \\vendor\\laravel\\framework\\src\\Illuminate\\Redis\\Connectors\\PhpRedisConnector.php(88): Illuminate\\Redis\\Connectors\\PhpRedisConnector->establishConnection(Object(Redis), Array) #2 \\vendor\\laravel\\framework\\src\\Illuminate\\Support\\helpers.php(307): Illuminate\\Redis\\Connectors\\PhpRedisConnector->Illuminate\\Redis\\Connectors\\{closure}(Object(Redis)) #3 \\vendor\\laravel\\framework\\src\\Illuminate\\Redis\\Connectors\\PhpRedisConnector.php(129): tap(Object(Redis), Object(Closure)) #4 \\vendor\\laravel\\framework\\src\\Illuminate\\Redis\\Connectors\\PhpRedisConnector.php(34): Illuminate\\Redis\\Connectors\\PhpRedisConnector->createClient(Array) #5 \\vendor\\laravel\\framework\\src\\Illuminate\\Redis\\Connectors\\PhpRedisConnector.php(38): Illuminate\\Redis\\Connectors\\PhpRedisConnector->Illuminate\\Redis\\Connectors\\{closure}() #6 \\vendor\\laravel\\framework\\src\\Illuminate\\Redis\\RedisManager.php(112): Illuminate\\Redis\\Connectors\\PhpRedisConnector->connect(Array, Array) #7 \\vendor\\laravel\\framework\\src\\Illuminate\\Redis\\RedisManager.php(91): Illuminate\\Redis\\RedisManager->resolve('models') #8 \\vendor\\laravel\\framework\\src\\Illuminate\\Cache\\RedisStore.php(330): Illuminate\\Redis\\RedisManager->connection('models') #9 \\vendor\\laravel\\framework\\src\\Illuminate\\Cache\\RedisTagSet.php(43): Illuminate\\Cache\\RedisStore->connection() #10 \\vendor\\laravel\\framework\\src\\Illuminate\\Collections\\LazyCollection.php(789): Illuminate\\Cache\\RedisTagSet->Illuminate\\Cache\\{closure}() #11 [internal function]: Illuminate\\Support\\LazyCollection->Illuminate\\Support\\{closure}() #12 \\vendor\\laravel\\framework\\src\\Illuminate\\Collections\\LazyCollection.php(1297): Generator->valid() #13 \\vendor\\laravel\\framework\\src\\Illuminate\\Cache\\RedisTaggedCache.php(129): Illuminate\\Support\\LazyCollection->Illuminate\\Support\\{closure}() #14 \\vendor\\laravel\\framework\\src\\Illuminate\\Cache\\RedisTaggedCache.php(112): Illuminate\\Cache\\RedisTaggedCache->flushValues() #15 \\vendor\\genealabs\\laravel-model-caching\\src\\Traits\\Caching.php(115): Illuminate\\Cache\\RedisTaggedCache->flush() #16 \\vendor\\genealabs\\laravel-model-caching\\src\\Traits\\Caching.php(269): \\Models\\Permission->flushCache()

@KieranFYI KieranFYI marked this pull request as ready for review February 25, 2024 05:16
@KieranFYI KieranFYI changed the title Ensure isCacheable in checkCooldownAndFlushAfterPersisting Ensure isCachable in checkCooldownAndFlushAfterPersisting Feb 25, 2024
@mikebronner mikebronner merged commit da53fcc into mikebronner:master Mar 2, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants