Hello, I need to cache the results from a parameterized python script that makes a parameterized database call for a long period of time (about a day) as the data doesn't change much. I have associated the script w/ a ram_cache manager and cranked up the expiration time but don't to be getting the consistent behavior I was expecting. The documentation in general for the zope caching seems pretty impoverished. Anyone know how to do this? Thanks, C>T>
CHRISTOPHER TIGNOR wrote:
I need to cache the results from a parameterized python script that makes a parameterized database call for a long period of time (about a day) as the data doesn't change much. I have associated the script w/ a ram_cache manager and cranked up the expiration time but don't to be getting the consistent behavior I was expecting. The documentation in general for the zope caching seems pretty impoverished. Anyone know how to do this?
Depends. What kind of behavior did you expect and what kind of behavior are you seeing? You'll have to give us more information about the requests and expected responses before we can really tell you what the problem is. Zope's caching documentation is somewhat anemic, it helps a great deal if you skip its pretenses and simply go directly to the source. Of course if you don't know python that might not be all that much more enlightening. I will say this, RCMs are not particularly flexible in-terms of what they use as a cache "key" (think: dictionary key), and you might have better luck with something that gives you more control (yes this is a thinly veiled plug for my own cache manager). But realy we need more data about what behavior you're trying to elicit. -- Jamie Heilman http://audible.transient.net/~jamie/ "Paranoia is a disease unto itself, and may I add, the person standing next to you may not be who they appear to be, so take precaution." -Sathington Willoughby
CHRISTOPHER TIGNOR wrote at 2003-10-5 23:19 -0400:
I need to cache the results from a parameterized python script that makes a parameterized database call for a long period of time (about a day) as the data doesn't change much.
Is your "parameterized database call" a Z SQL Method and your script returning the result of this? If so, the result is uncachable by the RAM cache manager. You could use the caching feature of the Z SQL Method (rather than use the RAM Cache Manager). Dieter
participants (3)
-
CHRISTOPHER TIGNOR -
Dieter Maurer -
Jamie Heilman