ported the new magic cache api to perl/psgi