public function generateCacheKey()
{
$name = $this->connection->getName();
$key = array();
$key[] = serialize($this->compileWheres($this));
if (is_null($this->columns)) {
$key[] = serialize($this->columns);
}
if (!is_null($this->orders)) {
$key[] = serialize($this->orders);
}
if (!is_null($this->offset)) {
$key[] = 'skip' . $this->offset;
}
if (!is_null($this->limit)) {
$key[] = 'limit' . $this->limit;
}
return md5($name . implode(',', $key));
}