| @@ 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 | ||
| @@ 882-896 (lines=15) @@ | ||
| 879 | $cacheKey = null; |
|
| 880 | $db = self::getInstance(); |
|
| 881 | ||
| 882 | if ($useCache === true) { |
|
| 883 | $cache = new Cache(null, null, false, $useCache); |
|
| 884 | $cacheKey = 'sql-' . md5($query); |
|
| 885 | ||
| 886 | if ( |
|
| 887 | $cache->getCacheIsReady() === true |
|
| 888 | && |
|
| 889 | $cache->existsItem($cacheKey) |
|
| 890 | ) { |
|
| 891 | return $cache->getItem($cacheKey); |
|
| 892 | } |
|
| 893 | ||
| 894 | } else { |
|
| 895 | $cache = false; |
|
| 896 | } |
|
| 897 | ||
| 898 | $result = $db->query($query); |
|
| 899 | ||