Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#15 spycecode never cached

closed-invalid
nobody
None
7
2007-02-02
2006-07-09
Pauli Virtanen
No

It appears that in current SVN (2006-07-09), spycecode
is never cached, as indicated by "generating new
spyceCode for ..." debug messages.

Looking at spyceCache.py reveals the line

if self.cache:
... generate and cache result ...
else:
... generate but don't cache ...

in semanticCache. Now, self.cache is initialized as {}
when using memory cache => cache is never filled.

The attached patch appears to fix this.

Discussion

  • Pauli Virtanen
    Pauli Virtanen
    2006-07-09

    • priority: 5 --> 7
     
  • Pauli Virtanen
    Pauli Virtanen
    2006-07-09

    Logged In: YES
    user_id=45712

    Attach the patch.

     
  • Pauli Virtanen
    Pauli Virtanen
    2006-07-09

    The patch

     
    Attachments
  • Jonathan Ellis
    Jonathan Ellis
    2007-02-02

    • status: open --> closed-invalid
     
  • Jonathan Ellis
    Jonathan Ellis
    2007-02-02

    Logged In: YES
    user_id=657828
    Originator: NO

    spycecodes are not cached between server restarts. perhaps that is what you saw? I see lots of "cache hit ... for request in ..." when I turn on full output.

    In any case the patch you submit is a no-op: whether self.cache is empty or None, it doesn't matter, has_key will return False either way. (and if cache is not empty, the patched and unpatched versions still do the same thing.)

     
  • Pauli Virtanen
    Pauli Virtanen
    2007-02-02

    Logged In: YES
    user_id=45712
    Originator: YES

    Hi,

    You are right, this problem is no more, since you fixed it in r946 after my report.
    I didn't remember I had submitted a report also here.