So now I can speed up loading of some already recently browsed content in my plugin. The question is about the cacheTime parameter. Is it supposed to be in milliseconds or seconds? Thanks to whoever knows the answer for this.
So now I can speed up loading of some already recently browsed content in my plugin. The question is about the cacheTime parameter. Is it supposed to be in milliseconds or seconds? Thanks to whoever knows the answer for this.
The cache time is in seconds. You should be aware that there’s currently a bug in the GetCached code that prevents the cache being saved between sessions - if your plug-in restarts, the cache will be lost. This will be fixed soon 
Ok, thanks. Good to know about the bug. Appreciate all the efforts to fix it!
For now, you can work around the bug by changing a value in Plugin.Dict, e.g. at the top of the file, import datetime, then add:
Plugin.Dict["Now"] = datetime.datetime.now()
in your request handler. This will force the dictionary (and the HTTP cache) to be saved.
Thanks for the tip. I tried to look for a ticket that I could follow. To know if it gets fixed. Is there one?
No, there are no framework related tickets, as there are a quite a few bugfixes, changes and new features we want to add. The code that’s out there at the moment is unfinished, and should really be regarded as a “preview” version of the framework. We wanted to get some things cleaned up & make a few additions before unleashing third party developers on it, which is why there’s no documentation yet, but you guys couldn’t wait 
The updated framework will be released soon with full documentation, code samples & tutorials. Existing plug-ins will need to be updated in order to use the new version, as it will break some existing code and require some new conventions to be followed. Plug-ins written against the preview version will continue to run - you’ll need to explicitly declare that you require the new framework if you wish to use it. Bugs like the one in PMS.HTTP.GetCached will be fixed in the preview version, but new features won’t be included.
Ok. Maybe it’s time to settle and wait for the proper framework to come out. It’s hard to wait, though 
Jam,
Should HTTP.GetCached() also work if the url contains characters like äöå? Or should I escape those kinds of characters? If yes, how?
Thanks.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.