Django: Session Cache not updated when using Cookie Based Session Storage
I am trying to use Django Session to cache some data. I don't have a database in my web app so, I am using the cookie-based storage mechanism. I am able to successfully save the data in the session only for the first time. Henceforth, if I try to update the session cache it doesn't work. Here is what I had found: prior_states = request.session.get(workflow_id, []) print "prior_state >>> ", prior_states if state_id in prior_states: request.session.update({workflow_id: prior_states[:prior_states.index(state_id) + 1]}) else: prior_states.append(state_id) request.session.update({workflow_id :