Commit db1395b7 authored by Marco Pivetta's avatar Marco Pivetta

Always serializing the `connectionParams` (easier)

parent a1b01060
...@@ -97,12 +97,12 @@ class QueryCacheProfile ...@@ -97,12 +97,12 @@ class QueryCacheProfile
* *
* @return array * @return array
*/ */
public function generateCacheKeys($query, $params, $types, array $connectionParams = array()) public function generateCacheKeys($query, $params, $types, array $connectionParams = [])
{ {
$realCacheKey = 'query=' . $query . $realCacheKey = 'query=' . $query .
'&params=' . serialize($params) . '&params=' . serialize($params) .
'&types=' . serialize($types) . '&types=' . serialize($types) .
(!empty($connectionParams) ? serialize($connectionParams) : ''); '&connectionParams=' . serialize($connectionParams);
// should the key be automatically generated using the inputs or is the cache key set? // should the key be automatically generated using the inputs or is the cache key set?
if ($this->cacheKey === null) { if ($this->cacheKey === null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment