Skip to content

Commit

Permalink
refactor(*): remove cache-clearing calls that do not do anything (#6861)
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherchrisberry committed Apr 18, 2019
1 parent a084b74 commit 0a5fd58
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ module.exports = angular
$scope.loadBalancer.vnet = null;
$scope.loadBalancer.vnetResourceGroup = null;
ctrl.selectedVnets = [];
InfrastructureCaches.clearCache('networks');

NetworkReader.listNetworks().then(function(vnets) {
if (vnets.azure) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ module.exports = angular

ctrl.selectedVnets = [];

InfrastructureCaches.clearCache('networks');

NetworkReader.listNetworks().then(function(vnets) {
if (vnets.azure) {
vnets.azure.forEach(vnet => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ module.exports = angular
ModalWizard.markComplete('load-balancers');
$scope.command.selectedVnetSubnets = [];
$scope.command.selectedSubnet = null;
InfrastructureCaches.clearCache('networks');
loadVnetSubnets(item);
};
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { IPromise } from 'angular';

import { Application } from 'core/application/application.model';
import { InfrastructureCaches } from 'core/cache';
import { ITask } from 'core/domain';
import { IJob, TaskExecutor } from 'core/task/taskExecutor';
import { IMoniker } from 'core/naming/IMoniker';
Expand Down Expand Up @@ -32,8 +31,6 @@ export class LoadBalancerWriter {
public static deleteLoadBalancer(command: ILoadBalancerDeleteCommand, application: Application): ng.IPromise<ITask> {
command.type = 'deleteLoadBalancer';

InfrastructureCaches.clearCache('loadBalancers');

return TaskExecutor.executeTask({
job: [command],
application,
Expand All @@ -50,8 +47,6 @@ export class LoadBalancerWriter {
Object.assign(command, params);
command.type = 'upsertLoadBalancer';

InfrastructureCaches.clearCache('loadBalancers');

return TaskExecutor.executeTask({
job: [command],
application,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class CommonGceLoadBalancerCtrl {
) {}

public onTaskComplete(loadBalancer: IGceLoadBalancer): void {
InfrastructureCaches.clearCache('healthCheck');
InfrastructureCaches.clearCache('healthChecks');
this.application.getDataSource('loadBalancers').refresh();
this.application
.getDataSource('loadBalancers')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ module.exports = angular
});
});

InfrastructureCaches.clearCache('loadBalancers');
InfrastructureCaches.clearCache('backendServices');
InfrastructureCaches.clearCache('healthChecks');

Expand All @@ -40,7 +39,6 @@ module.exports = angular

angular.extend(job, params);

InfrastructureCaches.clearCache('loadBalancers');
InfrastructureCaches.clearCache('backendServices');
InfrastructureCaches.clearCache('healthChecks');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { trimEnd } from 'lodash';
import {
AccountService,
Application,
InfrastructureCaches,
LoadBalancerWriter,
NameUtils,
NetworkReader,
Expand Down Expand Up @@ -274,7 +273,6 @@ export class OracleLoadBalancerController implements IController {
}

public loadVnets() {
InfrastructureCaches.clearCache('networks'); // TODO desagar previous code had this line. What does it do exactly? is it safe to clear?
NetworkReader.listNetworksByProvider(this.oracle).then((vnets: INetwork[]) => {
this.allVnets = vnets || [];
if (this.$scope.loadBalancerCmd.region) {
Expand Down

0 comments on commit 0a5fd58

Please sign in to comment.