Skip to content

Commit

Permalink
add prefix configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
RikudouSage committed Dec 31, 2020
1 parent cfd9816 commit edfe759
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"symfony/framework-bundle": "^5.0",
"rikudou/psr6-dynamo-db": "^1.3.1",
"rikudou/psr6-dynamo-db": "^1.4",
"php": "^7.2 | ^8.0",
"symfony/cache": "^5.0"
},
Expand Down
4 changes: 4 additions & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ public function getConfigTreeBuilder()
->info('The field to be used as value')
->defaultValue('value')
->end()
->scalarNode('key_prefix')
->info('The prefix used in front of keys when storing')
->defaultNull()
->end()
->end();

return $treeBuilder;
Expand Down
1 change: 1 addition & 0 deletions src/DependencyInjection/RikudouDynamoDbCacheExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ private function createCacheClient(ContainerBuilder $container, array $configs,
$definition->addArgument($configs['primary_key_field']);
$definition->addArgument($configs['ttl_field']);
$definition->addArgument($configs['value_field']);
$definition->setArgument('$prefix', $configs['key_prefix']);
}

/**
Expand Down

0 comments on commit edfe759

Please sign in to comment.