I have a python function which returns a list of dictionaries (a result for an ldap query). But since I don't want to enrage the sysadmin or have a real slow page, I want to be able to cache this list in zope, and only update it every hour or so. The question then is : Could anyone suggest something to store this list in? Preferably something which could accept the the list as it is, and be able to return it in a way so that I could iterate over it and build my webpage. I'm really not sure what would be the quickest/and or easiest. all help would appreciated. Jorg Rødsjø
on or about, Wednesday, November 13, 2002, we have reason to believe that Jorg E. Rødsjø wrote something along the lines of : JER> I have a python function which returns a list of dictionaries (a result for JER> an ldap query). But since I don't want to enrage the sysadmin or have a JER> real slow page, I want to be able to cache this list in zope, and only JER> update it every hour or so. JER> The question then is : Could anyone suggest something to store this list JER> in? Preferably something which could accept the the list as it is, and be JER> able to return it in a way so that I could iterate over it and build my JER> webpage. I'm really not sure what would be the quickest/and or easiest. the built-in RAM-Cache-managers will do exactly this for you. Really quick , and really easy. http://www.zope.org/Documentation/Books/ZopeBook/2_6Edition/ZopeServices.stx Except.. It does not seem like RAM-Cache-managers can cache external methods.. :P you will have to set up a proxying script(python) just returning the list. You can then associate the script with a RAM-cache with a 1 hour timeout. -- Geir Bækholt geir@funcom.com Tools/HCI-developer Tools/Billing - Product Operations Funcom Oslo
participants (2)
-
Geir B�kholt -
Jorg E. Rødsjø