[mod_python] Confused about file caching

Alex Gonzalez langabe at gmail.com
Thu Oct 29 18:58:24 EDT 2009


Hi,

I was trying to come up with a simple snippet that would show the
problem when I stumbled upon a workaround.

The problem lied in using two different xml parsers in the same
request for the same file. Initially it was using 4Dom via
xml.dom.ext.sax2, and immediately after minidom. My problem
disappeared when I switched all the code to minidom.

My best guess is some type of bug or incompatibility between libraries
but with the problem solved it's not important enough to be chasing
for the root cause.

Thanks for all the help,
Alex

On Thu, Oct 29, 2009 at 6:51 PM, David Lenwell <dlenwell at gmail.com> wrote:
> Alex.. It would be easier to be of help if I could see the snippet of code
> that is reading and writing this file .. also more information would be
> useful .. how frequent are the updates to this file? are they happening from
> lots of clients or just one.. it could be that your reading the file before
> the new changes are written to it .. but I couldn't be for sure where you
> should look without more information.
>
>
> David
>
> On Oct 29, 2009, at 3:53 AM, Alex Gonzalez wrote:
>
>> Hi,
>>
>> I am using apache 1.3.34 with mod_python 2.7.11 on Debian Etch.
>>
>> I have a request that parses, modifies and saves an XML file. A
>> subsequent request reopens the file for reading but it is sometimes
>> (not always) getting what seems to be a cached copy of the file
>> instead of the one that was recently modified and saved.
>>
>> What component is the more likely to be doing the caching, apache,
>> mod_python or the OS, and how would I go along disabling them
>> individually?
>>
>> Thanks in advance,
>> Alex
>> _______________________________________________
>> Mod_python mailing list
>> Mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>


More information about the Mod_python mailing list