[mod_python] PSP strcache error

techead at technetos.com techead at technetos.com
Mon May 17 18:16:37 EDT 2004

I was fighting the strcache.get() error in the PSP modules recently 
and decided it might be a bug in the psp.py module of mod_python.  
Grisha confirmed this and said that it will be fixed in the next 

In the mean time I made enough modifications to get it working for me 
so that I could use mem_scache.  Here is a diff output of the changes 
I made if anyone else is interested:

#diff psp.py.org psp.py
<             cached = strcache.get(string)
>             cached = mem_scache.get(string)
<                 self.code = _psp.parsestring(string)
<                 strcache.store(string)
>                 mem_scache.store(string,_psp.parsestring(string))
>                 self.code = mem_scache.get(string)
<         self.cache[key] = (1, val)
>         code = compile(val, "<string>", "exec")
>         self.cache[key] = (1, code)
<             hist, val = self.cache[key]
>             hits, code = self.cache[key]
<             return val
>             return code

More information about the Mod_python mailing list