| @@ 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 | ||
| @@ 830-844 (lines=15) @@ | ||
| 827 | $cacheKey = null; |
|
| 828 | $db = self::getInstance(); |
|
| 829 | ||
| 830 | if ($useCache === true) { |
|
| 831 | $cache = new Cache(null, null, false, $useCache); |
|
| 832 | $cacheKey = 'sql-' . md5($query); |
|
| 833 | ||
| 834 | if ( |
|
| 835 | $cache->getCacheIsReady() === true |
|
| 836 | && |
|
| 837 | $cache->existsItem($cacheKey) |
|
| 838 | ) { |
|
| 839 | return $cache->getItem($cacheKey); |
|
| 840 | } |
|
| 841 | ||
| 842 | } else { |
|
| 843 | $cache = false; |
|
| 844 | } |
|
| 845 | ||
| 846 | $result = $db->query($query); |
|
| 847 | ||