Skip to content

System generated reset redis cache db api

  • To reset the Redis cache of the database collections, database, and instance, use reset-redis-cache-db api.

Request Method: POST

URL

/api/system-api/user-path/reset-redis-cache-db

Request payload

  • Reset redis cache of single collection.
{
    "instance": "instance_name",
    "database": "database_name",
    "collection": "table_name"
}
  • Reset multiple database cache.
[
    {
        "instance": "instance_name",
        "database": "database_name",
        "collection": "table_name"
    },
    {
        "instance": "instance_name",
        "database": "database_name",
        "collection": "table_name"
    }
]
  • Reset all collections of the database and send the request payload as below.
{
    "instance": "instance_name",
    "database": "database_name"
}

Database cache reset

Reset cache of database table/collection using global object 'g'.

1
2
3
4
5
await g.sys.cache.resetCacheDB({
    instance: "INSTANCE_NAME",
    database: "DATABASE_NAME",
    collection: "COLLECTION_NAME"
});

API Response

{
    "success": true,
    "statusCode": 200,
    "data": 1
}