protected function generateEtag()
    {
        $keys      = array();
        $updatedAt = '';

        if (is_array($this->data)) {
            $keys = array_keys($this->data);

            if (isset($this->data['updated_at'])) {
                $updatedAt = $this->data->updated_at;
            }
        }

        if (is_object($this->data)) {
            $objectVars = get_object_vars($this->data);
            $keys = array_keys($objectVars);
            unset($objectVars);

            if (isset($this->data->updated_at)) {
                $updatedAt = $this->data->updated_at;
            }
        }

        $etag = '';

        if (empty($keys)) {
            return $etag;
        }

        foreach($keys as $item) {
            $etag .= $item;
        }

        $etag .= $updatedAt;

        return md5( $etag );
    }