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

Add extension autowired config #47

Merged
merged 1 commit into from
Nov 10, 2023
Merged

Conversation

vitkutny
Copy link
Contributor

@vitkutny vitkutny commented Oct 30, 2023

  1. allow override autowired client settings without dependind on 'default' client name
  2. allow autowired storage on non-autowired client
    • pass correct client definition into journal directly (dont depend autowired client)
    • storageAutowired config to override client autowired config

My usecase configuration:

redis:
	connection:
		cache:
			uri: tcp://%SECRETS_REDIS_HOST%
			storage: true
			storageAutowired: true
			options:
				parameters:
					database: %SECRETS_REDIS_DATABASE_CACHE%
		data: # persistent data (not flushed on cache:clean)
			autowired: true
			uri: tcp://%SECRETS_REDIS_HOST%
			options:
				parameters:
					database: %SECRETS_REDIS_DATABASE_DATA%

I needed to separate cache and data redis client. Data RedisClient is autowired in application, and cache RedisClient is not – it is only used inside Caching\RedisStorage – and this storage needs to be autowired without autowired client.

New settings are nullable with fallback to previous behaviour (autowired set by connection name) to prevent BC breaks.

1) allow override autowired client settings without dependind on client name
2) allow autowired storage on non-autowired client
 - pass right client definition into journal directly
 - storageAutowired config to override client autowired setting
@vitkutny
Copy link
Contributor Author

rebased to master to resolve conflicts

@f3l1x f3l1x merged commit 2d5db1c into contributte:master Nov 10, 2023
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants