The dotnet-sql-cache package installs the .NET command-line tool used to create the database table required by SQL Server distributed caching. It prepares the database; the ASP.NET Core application later consumes that table through SQL Server cache support. section 17.2.2
A practical setup sequence is:
- Remove an existing global installation, then install the required tool version. section 17.2.2
- Create or select the SQL Server database and run the tool with its connection string, schema, and cache-table name. section 17.2.2
- Check for the successful table-and-index message before configuring AddDistributedSqlServerCache. section 17.2.2
Listing 17.9 Installing the SQL cache package
dotnet tool uninstall --global dotnet-sql-cache dotnet tool install --global dotnet-sql-cache --version 7.0.0
Use the installation listing to reproduce the global tool setup, including the pinned 7.0.0 version. section 17.2.2
Listing 17.10 Creating the cache database table
dotnet sql-cache create "Server=(localdb)\MSSQLLocalDB;Database=CacheDb" dbo DataCache
Use the table-creation listing to supply the SQL Server connection string and dbo DataCache destination. section 17.2.2

