本文整理汇总了TypeScript中core/cache.InfrastructureCaches.clearCache方法的典型用法代码示例。如果您正苦于以下问题:TypeScript InfrastructureCaches.clearCache方法的具体用法?TypeScript InfrastructureCaches.clearCache怎么用?TypeScript InfrastructureCaches.clearCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core/cache.InfrastructureCaches
的用法示例。
在下文中一共展示了InfrastructureCaches.clearCache方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: deleteLoadBalancer
public static deleteLoadBalancer(command: ILoadBalancerDeleteCommand, application: Application): ng.IPromise<ITask> {
command.type = 'deleteLoadBalancer';
InfrastructureCaches.clearCache('loadBalancers');
return TaskExecutor.executeTask({
job: [command],
application,
description: `Delete load balancer: ${command.loadBalancerName}`,
});
}
示例2: clearCacheAndRetryAttachingSecurityGroups
private clearCacheAndRetryAttachingSecurityGroups(
application: Application,
nameBasedSecurityGroups: ISecurityGroup[],
): IPromise<any[]> {
InfrastructureCaches.clearCache('securityGroups');
return this.loadSecurityGroups().then((refreshedSecurityGroups: ISecurityGroupsByAccount) => {
application['securityGroupsIndex'] = refreshedSecurityGroups;
return this.attachSecurityGroups(application, nameBasedSecurityGroups, false);
});
}
示例3: upsertLoadBalancer
public static upsertLoadBalancer(
command: ILoadBalancerUpsertCommand,
application: Application,
descriptor: string,
params: any = {},
): IPromise<ITask> {
Object.assign(command, params);
command.type = 'upsertLoadBalancer';
InfrastructureCaches.clearCache('loadBalancers');
return TaskExecutor.executeTask({
job: [command],
application,
description: `${descriptor} Load Balancer: ${command['name']}`,
});
}