驱动API服务的构建需要很长时间(10+秒)。我尝试酸洗服务并重新加载它,但没有任何乐趣。有人知道如何让这个东西在本地缓存吗?
debug("Building Google Drive service")
from apiclient.discovery import build
self._service = build('drive', 'v2', http = http)
debug("Initialisation complete")
Run Code Online (Sandbox Code Playgroud)
您可以在 http 级别打开缓存:
http = httplib2.Http(cache=".cache")
Run Code Online (Sandbox Code Playgroud)
请参阅:https : //developers.google.com/appengine/articles/efficient_use_of_discovery_based_apis
| 归档时间: |
|
| 查看次数: |
973 次 |
| 最近记录: |