驱动API服务的构建需要很长的时间(10+秒)。我尝试腌制服务并重新加载它,但没有任何乐趣。有人知道如何让这个东西本地缓存吗?
debug("Building Google Drive service")
from apiclient.discovery import build
self._service = build('drive', 'v2', http = http)
debug("Initialisation complete")
最佳答案
您可以在 http 级别打开缓存:
http = httplib2.Http(cache=".cache")
请参阅:https://developers.google.com/appengine/articles/efficient_use_of_discovery_based_apis
关于google-drive-api - 构建 Drive v2 API 时,Google API 客户端非常慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16746545/