flows: add API to clear cache
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -9,7 +9,7 @@ import { DEFAULT_CONFIG } from "../../../api/Config";
|
||||
export class FlowCacheStatusCard extends AdminStatusCard<number> {
|
||||
|
||||
getPrimaryValue(): Promise<number> {
|
||||
return new FlowsApi(DEFAULT_CONFIG).flowsInstancesCached({}).then((value) => {
|
||||
return new FlowsApi(DEFAULT_CONFIG).flowsInstancesCacheInfo({}).then((value) => {
|
||||
return value.count || 0;
|
||||
});
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ import { DEFAULT_CONFIG } from "../../../api/Config";
|
||||
export class PolicyCacheStatusCard extends AdminStatusCard<number> {
|
||||
|
||||
getPrimaryValue(): Promise<number> {
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesAllCached({}).then((value) => {
|
||||
return new PoliciesApi(DEFAULT_CONFIG).policiesAllCacheInfo({}).then((value) => {
|
||||
return value.count || 0;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user