Skip to content

Commit

Permalink
refactor(core): Remove SNAPSHOT config reloading (causing perf issues).
Browse files Browse the repository at this point in the history
  • Loading branch information
msavy committed Jun 20, 2017
1 parent f53241d commit c9bd24d
Showing 1 changed file with 5 additions and 7 deletions.
Expand Up @@ -15,9 +15,6 @@
*/
package io.apiman.gateway.engine.policy;

import java.util.HashMap;
import java.util.Map;

import io.apiman.common.plugin.Plugin;
import io.apiman.common.plugin.PluginClassLoader;
import io.apiman.common.plugin.PluginCoordinates;
Expand All @@ -27,6 +24,9 @@
import io.apiman.gateway.engine.async.IAsyncResultHandler;
import io.apiman.gateway.engine.beans.exceptions.PolicyNotFoundException;

import java.util.HashMap;
import java.util.Map;

/**
* An implementation of the {@link IPolicyFactory} interface.
*
Expand Down Expand Up @@ -73,10 +73,8 @@ public Object loadConfig(IPolicy policy, String policySpec, String configData) {
Thread.currentThread().setContextClassLoader(oldCtxLoader);
}

// Note: don't cache configuration objects for snapshot versions of policies.
if (!policySpec.contains("-SNAPSHOT")) { //$NON-NLS-1$
policyConfigCache.put(cacheKey, config);
}
policyConfigCache.put(cacheKey, config);

return config;
}
}
Expand Down

0 comments on commit c9bd24d

Please sign in to comment.