Esempio n. 1
0
        $cache = queryCache::getInstance();
        $cache->reset($query, $prefix);
        if (!$cache->load()) {
            $cache->contents = POD::queryAllWithCache($query, $type, $count);
            $cache->update();
        }
        return $cache->contents;
    }
    public static function queryRowWithDBCache($query, $prefix = null, $type = 'both', $count = -1)
    {
        $cache = queryCache::getInstance();
        $cache->reset($query, $prefix);
        if (!$cache->load()) {
            $cache->contents = POD::queryRow($query, $type, $count);
            $cache->update();
        }
        return $cache->contents;
    }
    public static function queryColumnWithDBCache($query, $prefix = null, $type = 'both', $count = -1)
    {
        $cache = queryCache::getInstance();
        $cache->reset($query, $prefix);
        if (!$cache->load()) {
            $cache->contents = POD::queryColumn($query, $type, $count);
            $cache->update();
        }
        return $cache->contents;
    }
}
POD::cacheLoad();
register_shutdown_function(array('POD', 'cacheSave'));