Solved the JSON caching problem for bulk acceptance.
This is done in the same way as it is done in AJAX calls by appending the current time as a GET argument.
Patch by: Mario Ferraro, Lennard de Rijk
Reviewed by: Lennard de Rijk
--- a/app/soc/content/js/org-accept.js Thu Feb 26 08:48:02 2009 +0000
+++ b/app/soc/content/js/org-accept.js Thu Feb 26 09:02:51 2009 +0000
@@ -4,7 +4,7 @@
function acceptOrgInit(bulk_accept_link) {
// get the JSON object with details of every application for bulk acceptance
- $.getJSON(bulk_accept_link,
+ $.getJSON(bulk_accept_link+"?_="+(new Date().getTime()),
function(data){
// If there are applications to accept...
if (data.nr_applications != 0) {
--- a/app/soc/views/models/org_app.py Thu Feb 26 08:48:02 2009 +0000
+++ b/app/soc/views/models/org_app.py Thu Feb 26 09:02:51 2009 +0000
@@ -208,15 +208,7 @@
context = {'json': json}
template = 'soc/json.html'
- response = responses.respond(request, template, context)
-
- # if the browser supports HTTP/1.1
- # post-check and pre-check and no-store for IE7
- response['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'
- # if the browser supports HTTP/1.0
- response['Pragma'] = 'no-cache'
-
- return response
+ return responses.respond(request, template, context)
view = View()