public void clearAccessorCache() throws GadgetException { final boolean isLogging = BasicOAuth2Store.LOG.isLoggable(); if (isLogging) { BasicOAuth2Store.LOG.entering(BasicOAuth2Store.LOG_CLASS, "clearAccessorCache"); } try { this.cache.clearAccessors(); } catch (final OAuth2CacheException e) { if (isLogging) { BasicOAuth2Store.LOG.log("Error clearing OAuth2 Accessor cache", e); } throw new GadgetException(Code.OAUTH_STORAGE_ERROR, "Error clearing OAuth2Accessor cache", e); } if (isLogging) { BasicOAuth2Store.LOG.exiting(BasicOAuth2Store.LOG_CLASS, "clearAccessorCache"); } }
public boolean clearCache() throws GadgetException { final boolean isLogging = BasicOAuth2Store.LOG.isLoggable(); if (isLogging) { BasicOAuth2Store.LOG.entering(BasicOAuth2Store.LOG_CLASS, "clearCache"); } try { this.cache.clearClients(); this.cache.clearTokens(); this.cache.clearAccessors(); } catch (final OAuth2PersistenceException e) { if (isLogging) { BasicOAuth2Store.LOG.log("Error clearing OAuth2 cache", e); } throw new GadgetException(Code.OAUTH_STORAGE_ERROR, "Error clearing OAuth2 cache", e); } if (isLogging) { BasicOAuth2Store.LOG.exiting(BasicOAuth2Store.LOG_CLASS, "clearCache", true); } return true; }