Kodi Community Forum
[Release] Common plugin cache - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: [Release] Common plugin cache (/showthread.php?tid=116496)

Pages: 1 2 3 4 5 6 7 8 9 10 11


- Bstrdsmkr - 2012-01-24

just wanted to report in, (unfortunately I didn't get a log) I had trouble creating a cache table with the name containing a "."

Changing the cache.table_name and deleting the db file fixed it. It's worth noting that just changing the name wasn't enough, I had to delete the db for it to create the table. The original name I tried to use was 1channel.ch

I know it's not much to go on, but hopefully it'll help someone in the future Big Grin


- TobiasTheCommie - 2012-01-26

Bstrdsmkr Wrote:just wanted to report in, (unfortunately I didn't get a log) I had trouble creating a cache table with the name containing a "."

Changing the cache.table_name and deleting the db file fixed it. It's worth noting that just changing the name wasn't enough, I had to delete the db for it to create the table. The original name I tried to use was 1channel.ch

I know it's not much to go on, but hopefully it'll help someone in the future Big Grin

Fixed in trunk.


- TobiasTheCommie - 2012-01-27

Pull requests have been sent for 0.9.1.

The updated version should land in the Eden repository soonish.


- Martijn - 2012-01-27

TobiasTheCommie Wrote:Pull requests have been sent for 0.9.1.

The updated version should land in the Eden repository soonish.

Is that the one i was beta testing for Artwork Downloader?


- TobiasTheCommie - 2012-01-27

Martijn Wrote:Is that the one i was beta testing for Artwork Downloader?

Yes. Smile


- Martijn - 2012-01-27

TobiasTheCommie Wrote:Yes. Smile

oh goodie Big Grin
Gonna do some testing then and maybe push an update Wink


- TobiasTheCommie - 2012-01-27

Martijn Wrote:oh goodie Big Grin
Gonna do some testing then and maybe push an update Wink

In that case, this is what we sent in the PR
Quote:hg clone http://hg.tobiasussing.dk/hgweb.cgi/cachexbmc/ script.common.plugin.cache -b release -r fabfccb1731a

That will give you the exact same code as what will land in the Eden repo.


- Martijn - 2012-01-27

TobiasTheCommie Wrote:In that case, this is what we sent in the PR


That will give you the exact same code as what will land in the Eden repo.

thx Smile

But because i was gonna wait till tomorrow because now i'm emptying a case of beer and watching a movie i would have the correct version anyway Big Grin


- TobiasTheCommie - 2012-01-27

Heh, enjoy Smile


- Jarviss - 2012-02-01

Would be anything I could do to make this install correctly. I get update failed evrytime I try update or manually install.


- TobiasTheCommie - 2012-02-01

Not that i know off. Maybe there would be something in an xbmc debug log.


Why roll your own? - Bighampton - 2012-02-02

TobiasTheCommie,

I think a common plugin cache is an outstanding idea, but I'm puzzled why you decided to roll your own instead of using an existing package that has a proven track record (such as Beaker)?


- TobiasTheCommie - 2012-02-02

Bighampton Wrote:TobiasTheCommie,

I think a common plugin cache is an outstanding idea, but I'm puzzled why you decided to roll your own instead of using an existing package that has a proven track record (such as Beaker)?

Never heard of Beaker.

This was mostly just made to speedup the YouTube plugin. Then when we started making BlipTV it became apparent that it was in even more need for a speedup than YouTube.

So we separated it out and generalized it a bit.

We also needed something that was thread-safe(for the downloader).


- Popeye - 2012-02-03

I'm to much of a beginner to fully understand what the common cache manages to store. I need to cache xml pages of a few 1000 lines for a variable amount of time, is the common cache something for me then?


- TobiasTheCommie - 2012-02-03

Popeye Wrote:I'm to much of a beginner to fully understand what the common cache manages to store. I need to cache xml pages of a few 1000 lines for a variable amount of time, is the common cache something for me then?
http://wiki.xbmc.org/index.php?title=Add-on:Common_plugin_cache#cacheFunction.28self.2C_funct_.3D_False.2C_.2Aargs.29


The cache stores whatever your function returns.

If you have a function like:
def getXML():
return [ "xml" ]

then

result = cache.cacheFunction(getXML)

will store [ "xml"]

Whatever your getXML function returns, will be cached.

The next call to
result = cache.cacheFunction(getXML)
within the timeout you have defined(or 24 hours) will NOT call your getXML function, but will just return the stored cache.

But i suggest you read the wiki.