From d85c48a73cbb76e11c10e507496e438d4ee3a165 Mon Sep 17 00:00:00 2001 From: Chris Knoll Date: Tue, 17 Dec 2024 10:22:39 -0500 Subject: [PATCH] Revert 'Clear Server Cache' button to just clear the middle-tier cache. (#2986) --- js/services/CacheAPI.js | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/js/services/CacheAPI.js b/js/services/CacheAPI.js index 3e42aafeb..b2a8f9ab1 100644 --- a/js/services/CacheAPI.js +++ b/js/services/CacheAPI.js @@ -1,20 +1,19 @@ -define(function (require, exports) { - const config = require('appConfig'); - const authApi = require('services/AuthAPI'); - const httpService = require('services/http'); +define(function(require, exports) { - function clearCache() { - return httpService - .doPost(config.webAPIRoot + 'cdmresults/clearCache') - .then((res) => res.data) - .catch((error) => { - console.log('Error: ' + error); - authApi.handleAccessDenied(error); - return Promise.reject(error); - }); - } + const config = require('appConfig'); + const authApi = require('services/AuthAPI'); + const httpService = require('services/http'); - return { - clearCache, - }; + function clearCache() { + return httpService.doGet(config.webAPIRoot + 'cache/clear') + .then(res => res.data) + .catch((error) => { + console.log("Error: " + error); + authApi.handleAccessDenied(error); + }); + } + + return { + clearCache, + }; });