Fixed some precache bugs
Fixed permutation of mysql and sqlite