fgcz / bfabricPy

API and commad line tools for b-fabric

Home Page:https://fgcz.github.io/bfabricPy/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

enable caching

cpanse opened this issue · comments

no significant performance improvements using the follwoing code snippet

from suds.client import ObjectCache
# ...
oc = ObjectCache("/tmp/suds/")
oc.setduration(days=30)
self.cl[endpoint] = Client("".join((self.webbase, '/', endpoint, "?wsdl")), cache=oc, cachingpolicy=1) 

also, it is unclear if caching is enabled. (if the number of queries is reduced and the cache is used.)
simple check: the network in un plugged.

I think we can close this one as well, especially since now the flask server is re-using the Bfabric instance it will "cache" the most expensive parts which is fetching and parsing the WSDL definition between requests.