public function objectIncrementCount($action, $object, $bucket = null)
    {
        /** @var \CI_Db $oDb */
        $oDb = Factory::service('Database');

        switch (strtoupper($action)) {
            case 'SERVE':
                $oDb->set('o.serves', 'o.serves+1', false);
                break;

            case 'DOWNLOAD':
                $oDb->set('o.downloads', 'o.downloads+1', false);
                break;

            case 'THUMB':
            case 'CROP':
                $oDb->set('o.thumbs', 'o.thumbs+1', false);
                break;

            case 'SCALE':
                $oDb->set('o.scales', 'o.scales+1', false);
                break;
        }

        if (is_numeric($object)) {
            $oDb->where('o.id', $object);
        } else {
            $oDb->where('o.filename', $object);
        }

        if ($bucket && is_numeric($bucket)) {
            $oDb->where('o.bucket_id', $bucket);
            return $oDb->update(NAILS_DB_PREFIX . 'cdn_object o');
        } elseif ($bucket) {
            $oDb->where('b.slug', $bucket);
            $oDb->join(NAILS_DB_PREFIX . 'cdn_bucket b', 'b.id = o.bucket_id');
            return $oDb->update(NAILS_DB_PREFIX . 'cdn_object o');
        } else {
            return $oDb->update(NAILS_DB_PREFIX . 'cdn_object o');
        }
    }