How to cache remote json/html ?
#1
I'd like to add something like a small cache system to my plugin.

Every time user select/click, a html or a json is remotely loaded.

I'd like to save into a file what's been downloaded, and, for just one hour, to use it for future refresh instead of re-download the content.

I need actaully no info about file handling, what I need to know is: if plugin dir is read only (or it must be handled as readonly), if I want to save something, in which dir can I save tmp data? Or there is some xbmc default way to handle cases like this?

I downloaded some addons I consider 'good' and It seems like no one of these uses caching tricks...
Reply
#2
http://wiki.xbmc.org/index.php?title=Add...ugin_cache
Reply
#3
usage:
https://github.com/XBMC-Addons/script.ar...ils.py#L50
and
https://github.com/XBMC-Addons/script.ar...ls.py#L140
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
How to cache remote json/html ?0