Patch for mysql cache in 1.9.1

Locked
carlocapocasa
User
Posts:4
Joined:Thu Nov 03, 2011 8:48 am
Are you a spambot?:no
Patch for mysql cache in 1.9.1

Post by carlocapocasa » Thu Nov 03, 2011 9: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

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: Patch for mysql cache in 1.9.1

Post by James Heinrich » Thu Nov 03, 2011 12:52 pm

I'd be interested in seeing your changes. Did you mean to attach the patch file? Or where can I see it?

carlocapocasa
User
Posts:4
Joined:Thu Nov 03, 2011 8:48 am
Are you a spambot?:no

Re: Patch for mysql cache in 1.9.1

Post by carlocapocasa » Fri Nov 04, 2011 12:33 pm

Oh sorry missed an upload err msg, here it is! Carlo
Attachments
mysql-mod.zip
(1.56KiB)Downloaded 975 times

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: Patch for mysql cache in 1.9.1

Post by James Heinrich » Fri Nov 04, 2011 1:26 pm

Thanks, changes accepted mostly as provided, will be included in v1.9.2
Attachments
extension.cache.mysql.php
(6.07KiB)Downloaded 960 times

carlocapocasa
User
Posts:4
Joined:Thu Nov 03, 2011 8:48 am
Are you a spambot?:no

Re: Patch for mysql cache in 1.9.1

Post by carlocapocasa » Fri Nov 04, 2011 2:28 pm

Great! *is proud*

Good point btw that someone might provide a non-hardcoded table name... Paranoia is a quality I truly admire :)

Locked