@@ -42,21 +42,28 @@ class PdoTagAwareAdapter extends AbstractTagAwareAdapter implements PruneableInt
42
42
* cache is actually used.
43
43
*
44
44
* List of available options:
45
- * * db_table: The name of the table [default: cache_items]
45
+ * * db_table: The name of the cache item table [default: cache_items]
46
46
* * db_id_col: The column where to store the cache id [default: item_id]
47
47
* * db_data_col: The column where to store the cache data [default: item_data]
48
48
* * db_lifetime_col: The column where to store the lifetime [default: item_lifetime]
49
49
* * db_time_col: The column where to store the timestamp [default: item_time]
50
50
* * db_username: The username when lazy-connect [default: '']
51
51
* * db_password: The password when lazy-connect [default: '']
52
52
* * db_connection_options: An array of driver-specific connection options [default: []]
53
+ * * db_tags_table: The name of the tags table [default: cache_tags]
54
+ * * db_tags_col: The column where to store the tags [default: item_tag]
55
+ * * db_tags_tag_index_name: The index name for the tags column [default: idx_cache_tags_item_tag]
53
56
*
54
57
* @throws InvalidArgumentException When first argument is not PDO nor Connection nor string
55
58
* @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION
56
59
* @throws InvalidArgumentException When namespace contains invalid characters
57
60
*/
58
61
public function __construct (#[\SensitiveParameter] \PDO |string $ connOrDsn , string $ namespace = '' , int $ defaultLifetime = 0 , array $ options = [], ?MarshallerInterface $ marshaller = null )
59
62
{
63
+ $ this ->tagsTable = $ options ['db_tags_table ' ] ?? $ this ->tagsTable ;
64
+ $ this ->tagCol = $ options ['db_tags_col ' ] ?? $ this ->tagCol ;
65
+ $ this ->tagIdxName = $ options ['db_tags_tag_index_name ' ] ?? $ this ->tagIdxName ;
66
+
60
67
$ this ->init ($ connOrDsn , $ namespace , $ defaultLifetime , $ options , $ marshaller );
61
68
}
62
69
0 commit comments