Skip to content

Commit

Permalink
Revert 'Clear Server Cache' button to just clear the middle-tier cach…
Browse files Browse the repository at this point in the history
…e. (#2986)
  • Loading branch information
chrisknoll authored Dec 17, 2024
1 parent 5163a9d commit d85c48a
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions js/services/CacheAPI.js
Original file line number Diff line number Diff line change
@@ -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,
};
});

0 comments on commit d85c48a

Please sign in to comment.