Purpose
The ALTER SYSTEM FLUSH LOCAL_CACHE statement is used to flush local cache data of a specified type for a specified tenant.
Privilege requirements
This statement must be executed by the root user of the sys tenant. User tenants do not support this statement.
Syntax
ALTER SYSTEM FLUSH LOCAL_CACHE TENANT [=] tenant_name [CACHE [=] cache_type];
cache_type:
macro_cache
| mem_macro_cache
| hot_macro_cache
Parameters
Parameter |
Description |
|---|---|
| tenant_name | Specifies the user tenant whose local cache is to be cleaned. Only one tenant can be specified per statement. |
| cache_type | Specifies the type of local cache to be cleaned. Only one type can be specified per statement. Supported types:
If not used, If you specify the type of local cache to be cleaned, all types of local cache data will be cleaned by default. |
Examples
In the
systenant, clean up all types of data cached locally by themysql_tenanttenant.obclient(root@sys)[(none)]> ALTER SYSTEM FLUSH LOCAL_CACHE TENANT = 'mysql_tenant';In the
systenant, clean up the memory macroblock cache data in the local cache of themysql_tenanttenant.obclient(root@sys)[(none)]> ALTER SYSTEM FLUSH LOCAL_CACHE TENANT = 'mysql_tenant' CACHE = 'mem_macro_cache';