Drops the cached answers of the generated and schema APIs of a table, of every table of a database, or of every database of an instance. Writes through API Maker do it on their own ; this API is for data changed outside API Maker, or a cache you want gone now.
Method
POST
URL
/api/system-api/admin/reset-redis-cache-db : admin is the user path of your account
Body
{ instance, database?, collection? } or an array of them
Answer
data : the number of cache entries removed, or an array of numbers
Names the tenant after the instance : only the cached answers of acme go. Without a tenant, the cache of the table is reset for the structure database and every tenant. See Multi-tenant.
Name the tenant after the instance to reset the cache of that tenant of a multi-tenant instance only. Without a tenant, the cache of the table is reset for its structure database and every tenant.
awaitg.sys.cache.resetCacheDB({instance:"crm::acme",database:"crm",collection:"customers"});// the tenant acmeawaitg.sys.cache.resetCacheDB({instance:"crm",database:"crm",collection:"customers"});// the structure database and every tenant
awaitg.sys.cache.reset_cache_db('crm::acme','crm','customers')# the tenant acmeawaitg.sys.cache.reset_cache_db('crm','crm','customers')# the structure database and every tenant
$g->sys->cache->resetCacheDB('crm::acme', 'crm', 'customers'); // the tenant acme$g->sys->cache->resetCacheDB('crm', 'crm', 'customers'); // the structure database and every tenant
awaitg.Sys.Cache.ResetCacheDB(newResetCacheDB("crm::acme","crm","customers"));// the tenant acmeawaitg.Sys.Cache.ResetCacheDB(newResetCacheDB("crm","crm","customers"));// the structure database and every tenant
if_,err:=g.Sys.Cache.ResetCacheDB(am.ResetCacheDB{Instance:"crm::acme",Database:"crm",Collection:"customers"});err!=nil{// the tenant acmereturnnil,err}if_,err:=g.Sys.Cache.ResetCacheDB(am.ResetCacheDB{Instance:"crm",Database:"crm",Collection:"customers"});err!=nil{// the structure database and every tenantreturnnil,err}
g.sys.cache.reset_cache_db(ResetCacheDB::new("crm::acme","crm","customers"))?;// the tenant acmeg.sys.cache.reset_cache_db(ResetCacheDB::new("crm","crm","customers"))?;// the structure database and every tenant
g.sys.cache.resetCacheDB(newResetCacheDB("crm::acme","crm","customers"));// the tenant acmeg.sys.cache.resetCacheDB(newResetCacheDB("crm","crm","customers"));// the structure database and every tenant
g.sys.cache.resetCacheDB(ResetCacheDB("crm::acme","crm","customers"))// the tenant acmeg.sys.cache.resetCacheDB(ResetCacheDB("crm","crm","customers"))// the structure database and every tenant
Over HTTP, a system API answers once its settings give it apiAccessType: TOKEN_ACCESS (the token of an API user whose group grants this system API, in x-am-authorization) or IS_PUBLIC. Without settings it is NO_ACCESS : your code calls it through g.sys, the admin panel tests it, and an HTTP call is refused.
The settings can also cache the answer or require person tokens (authProviders) ; pre and post hooks run around it like around any API.
The request headers apply : x-am-response-case, x-am-content-type-response, x-am-internationalization, x-am-tenant-username…