| @@ 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 | ||
| @@ 855-869 (lines=15) @@ | ||
| 852 | $cacheKey = null; |
|
| 853 | $db = self::getInstance(); |
|
| 854 | ||
| 855 | if ($useCache === true) { |
|
| 856 | $cache = new Cache(null, null, false, $useCache); |
|
| 857 | $cacheKey = 'sql-' . md5($query); |
|
| 858 | ||
| 859 | if ( |
|
| 860 | $cache->getCacheIsReady() === true |
|
| 861 | && |
|
| 862 | $cache->existsItem($cacheKey) |
|
| 863 | ) { |
|
| 864 | return $cache->getItem($cacheKey); |
|
| 865 | } |
|
| 866 | ||
| 867 | } else { |
|
| 868 | $cache = false; |
|
| 869 | } |
|
| 870 | ||
| 871 | $result = $db->query($query); |
|
| 872 | ||