Re: Array sharing across frame carries stale copy - How to fix it?

18 views
Skip to first unread message

Daniel Roseman

unread,
Oct 4, 2012, 10:18:51 AM10/4/12
to django...@googlegroups.com
On Thursday, 4 October 2012 11:12:42 UTC+1, anirM wrote:
Hi:

Thanks for your help. I am new here.

I have two iframes and a common data model. On one frame I perform query on the data and create a list/array which is then pushed via an URL and view on to the other iframe for processing and display. Because they are in different frames, I am using different view functions. But, as the first query is done, I populate a first_frame_view.search_list array that I expect to be available (via the same views.py) to the other iframe in its view function if I refer it the same first_frame_view.search_list. That's exactly the behavior I get on development server from django (runserver), but mod_WSGI returns unpredictable stale copy of the search_list. Could you please suggest an alternative or a fix. Thanks in advance.
anirM

How can we suggest a fix if you don't provide any code? I'll take a guess: you're storing something at the module level. That sounds like an extremely bad idea, as not only will it be visible to the other frame, but also to all other users who happen to be served from the same process. Use a session, that's what they're for.
--
DR.
Reply all
Reply to author
Forward
0 new messages