private function check_table_exists()
    {
        if ($this->type == 'sqlite') {
            $query = "SELECT count(*) FROM sqlite_master WHERE name='cache'";
            $result = $this->db->query($query);
            $numbers = $result->fetchAll();
            if ($numbers[0]['count(*)'] > 0) {
                // Ok
            } else {
                $this->create_table();
            }
        } else {
            $query = "show tables like 'cache'";
            $result = $this->db->query($query);
            if ($result->size() > 0) {
                // Ok
            } else {
                $this->create_table();
            }
        }
    }