From ffb41c40a02d3f67d1eb9720a3b8bc0528ccffa0 Mon Sep 17 00:00:00 2001 From: pines Date: Sun, 3 Sep 2006 09:28:07 +0000 Subject: [PATCH] clearing the cache since it started to interfere with the offline cgi scripts. tweaked the wording where the session processing status screen was going to be git-svn-id: svn://svn.open-ils.org/ILS/trunk@5887 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/OpenILS/global_util.js | 12 ++++++++++++ .../server/admin/offline_manage_xacts.js | 5 +++++ .../server/admin/offline_manage_xacts.xul | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js b/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js index 79bdc6a64b..ae380521ba 100644 --- a/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js +++ b/Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js @@ -66,3 +66,15 @@ } } + function clear_the_cache() { + try { + netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); + var cacheClass = Components.classes["@mozilla.org/network/cache-service;1"]; + var cacheService = cacheClass.getService(Components.interfaces.nsICacheService); + cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK); + cacheService.evictEntries(Components.interfaces.nsICache.STORE_IN_MEMORY); + } catch(E) { + alert('Problem clearing the cache: ' + E); + } + } + diff --git a/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js b/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js index 6fb8ba8afe..2765bbe712 100644 --- a/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js +++ b/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.js @@ -349,6 +349,7 @@ admin.offline_manage_xacts.prototype = { 'execute_ses' : function() { var obj = this; + clear_the_cache(); obj.data.stash_retrieve(); for (var i = 0; i < obj.sel_list.length; i++) { @@ -374,6 +375,7 @@ admin.offline_manage_xacts.prototype = { 'ses_errors' : function() { var obj = this; + clear_the_cache(); obj.data.stash_retrieve(); var url = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI) @@ -491,6 +493,7 @@ admin.offline_manage_xacts.prototype = { 'ses_status' : function() { var obj = this; + clear_the_cache(); obj.data.stash_retrieve(); var url = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI) @@ -516,6 +519,7 @@ admin.offline_manage_xacts.prototype = { var desc = window.prompt('Please enter a description:','','Create an Offline Transaction Session'); if (desc=='' || desc==null) { return; } + clear_the_cache(); obj.data.stash_retrieve(); var url = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI) @@ -542,6 +546,7 @@ admin.offline_manage_xacts.prototype = { try { + clear_the_cache(); obj.data.stash_retrieve(); var url = xulG.url_prefix(urls.XUL_OFFLINE_MANAGE_XACTS_CGI) diff --git a/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul b/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul index 46f6aefd6c..b7bcb3b608 100644 --- a/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul +++ b/Open-ILS/xul/staff_client/server/admin/offline_manage_xacts.xul @@ -96,7 +96,7 @@ - +