Patch for mysql cache in 1.9.1

Patch for mysql cache in 1.9.1

Postby carlocapocasa » Thu Nov 03, 2011 4:12 am

Hi James!

Thanks a log for making getID3. I am the author of Audiobar, a WordPress plugin, and I just switched to using getID3 in the 1.0.1 release (out since yesterday, yay). My previous tag libs were pretty flaky, but yours performed fantastic in all my tests and I love the architecture. Kudos!

So I hacked the mysql caching extension a little:

  • Empty string returned on cache miss, fixed
  • PHP 5.2+ chokes on $this::$staticvar, changed to self::$staticvar
  • Optionally provide your own cache table name on init

To apply the changes, do

Code: Select all
patch < mysql-mod.patch
in getid3 dir of 1.9.1

Hope this is useful!

Carlo
carlocapocasa
User
 
Posts: 4
Joined: Thu Nov 03, 2011 3:48 am

Re: Patch for mysql cache in 1.9.1

Postby James Heinrich » Thu Nov 03, 2011 7:52 am

I'd be interested in seeing your changes. Did you mean to attach the patch file? Or where can I see it?
James Heinrich
getID3() v1 developer
 
Posts: 1203
Joined: Fri May 04, 2001 11:00 am
Location: London, ON, Canada

Re: Patch for mysql cache in 1.9.1

Postby carlocapocasa » Fri Nov 04, 2011 7:33 am

Oh sorry missed an upload err msg, here it is! Carlo
Attachments
mysql-mod.zip
(1.56 KiB) Downloaded 215 times
carlocapocasa
User
 
Posts: 4
Joined: Thu Nov 03, 2011 3:48 am

Re: Patch for mysql cache in 1.9.1

Postby James Heinrich » Fri Nov 04, 2011 8:26 am

Thanks, changes accepted mostly as provided, will be included in v1.9.2
Attachments
extension.cache.mysql.php
(6.07 KiB) Downloaded 227 times
James Heinrich
getID3() v1 developer
 
Posts: 1203
Joined: Fri May 04, 2001 11:00 am
Location: London, ON, Canada

Re: Patch for mysql cache in 1.9.1

Postby carlocapocasa » Fri Nov 04, 2011 9:28 am

Great! *is proud*

Good point btw that someone might provide a non-hardcoded table name... Paranoia is a quality I truly admire :)
carlocapocasa
User
 
Posts: 4
Joined: Thu Nov 03, 2011 3:48 am


Return to Bug Reports (v1.x) - resolved

Who is online

Users browsing this forum: No registered users and 0 guests

cron