implemented sqlite cache for mysql