Skip to content

Commit 79d6519

Browse files
committed
Changes to the docs relating optinal schemaName/--databaseName
1 parent 293cef4 commit 79d6519

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ Basing on https://learn.microsoft.com/en-us/aspnet/core/performance/caching/dist
88

99
The Distributed MySQL Server Cache implementation (**AddDistributedMySqlCache**) allows the distributed cache to use a MySQL Server database as its backing store. To create a MySQL Server cached item table in a MySQL Server instance, you can use the `dotnet-mysql-cache` tool. The tool creates a table with the name and schema that you specify.
1010

11-
Create a table in MySQL Server by running the `dotnet mysql-cache create` command. Provide the MySQL Server connection string, instance (for example `server=192.169.0.1`), database (for example, `databaseName`), and table name (for example, `NewTableName`):
11+
Create a table in MySQL Server by running the `dotnet mysql-cache create` command. Provide the MySQL Server connection string, instance (for example `server=192.169.0.1`), table name (for example, `NewTableName`) and optional database (for example, `MyDatabaseName`):
1212

1313
```dotnetcli
14-
dotnet mysql-cache create "server=192.169.0.1;user id=userName;password=P4ssword123!;port=3306;database=databaseName;Allow User Variables=True" databaseName "NewTableName"
14+
dotnet mysql-cache create "server=192.169.0.1;user id=userName;password=P4ssword123!;port=3306;database=MyDatabaseName;Allow User Variables=True" "NewTableName" --databaseName "MyDatabaseName"
1515
```
1616

1717
A message is logged to indicate that the tool was successful:
@@ -33,8 +33,8 @@ The example snippet how to implement MySql Server cache in `Program.cs`:
3333
builder.Services.AddDistributedMySqlCache(options =>
3434
{
3535
options.ConnectionString = builder.Configuration.GetConnectionString("DistCache_ConnectionString");
36-
options.SchemaName = "databaseName";
37-
options.TableName = "NewTableName";
36+
options.SchemaName = "MyDatabaseName"; //optional
37+
options.TableName = "NewTableName"; //required
3838
});
3939
```
4040

0 commit comments

Comments
 (0)