| @@ 137-151 (lines=15) @@ | ||
| 134 | ' . $whereSQL . ' |
|
| 135 | '; |
|
| 136 | ||
| 137 | if ($useCache === true) { |
|
| 138 | $cache = new Cache(null, null, false, $useCache); |
|
| 139 | $cacheKey = 'sql-phonetic-search-' . md5($query); |
|
| 140 | ||
| 141 | if ( |
|
| 142 | $cache->getCacheIsReady() === true |
|
| 143 | && |
|
| 144 | $cache->existsItem($cacheKey) |
|
| 145 | ) { |
|
| 146 | return $cache->getItem($cacheKey); |
|
| 147 | } |
|
| 148 | ||
| 149 | } else { |
|
| 150 | $cache = false; |
|
| 151 | } |
|
| 152 | ||
| 153 | $result = $dbConnection->query($query); |
|
| 154 | ||
| @@ 892-906 (lines=15) @@ | ||
| 889 | $cacheKey = null; |
|
| 890 | $db = self::getInstance(); |
|
| 891 | ||
| 892 | if ($useCache === true) { |
|
| 893 | $cache = new Cache(null, null, false, $useCache); |
|
| 894 | $cacheKey = 'sql-' . md5($query); |
|
| 895 | ||
| 896 | if ( |
|
| 897 | $cache->getCacheIsReady() === true |
|
| 898 | && |
|
| 899 | $cache->existsItem($cacheKey) |
|
| 900 | ) { |
|
| 901 | return $cache->getItem($cacheKey); |
|
| 902 | } |
|
| 903 | ||
| 904 | } else { |
|
| 905 | $cache = false; |
|
| 906 | } |
|
| 907 | ||
| 908 | $result = $db->query($query); |
|
| 909 | ||