feat: add CachedQRCodeProvider

This commit is contained in:
2024-01-18 15:21:41 +01:00
parent 574dba85ad
commit 9bd3b5efff
8 changed files with 73 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
framework:
cache:
# Unique name of your app: used to compute stable namespaces for cache keys.
#prefix_seed: your_vendor_name/app_name
prefix_seed: ovlach/symfony_example_app
# The "app" cache stores to the filesystem by default.
# The data in this cache should persist between deploys.

View File

@@ -40,9 +40,14 @@ services:
$username: '%app.usetreno.username%'
$password: '%app.usetreno.password%'
App\Service\CachedQRCodeGenerator:
arguments:
$innerGenerator: '@App\Service\Remote\UsetrenoQRCodeProvider'
$cacheDuration: 'PT60S'
App\Service\CurrencyListerInterface: '@App\Service\StaticCurrencyLister'
App\Service\QRCodeQROptionsProviderInterface: '@App\Service\QRCodeQROptionsDefaultProvider'
App\Service\QRCodeGeneratorInterface: '@App\Service\Remote\UsetrenoQRCodeProvider'
App\Service\QRCodeGeneratorInterface: '@App\Service\CachedQRCodeGenerator'
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones