Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
[release] script.module.requests-cache
#1
https://github.com/reclosedev/requests-cache
packaged for kodi

if you use the requests package to communicate with web sites, requests-cache offers a transparent way to cache the replies from those sites without much change in your code.
Just import the requests-cache package, set-up the cache file and all requests response will be cached.

usage:
Code:
import requests_cache

#define the cache file to reside in the ..\Kodi\userdata\addon_data\(your addon)
addonUserDataFolder = xbmc.translatePath(addon.getAddonInfo('profile'))
CACHE_FILE          = xbmc.translatePath(os.path.join(addonUserDataFolder, 'requests_cache'))

#cache expires after: 86400=1 day   604800=7 days
requests_cache.install_cache(CACHE_FILE, backend='sqlite', expire_after=604800 )
Reply

Logout Mark Read Team Forum Stats Members Help
[release] script.module.requests-cache0