| @@ 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 | ||
| @@ 776-790 (lines=15) @@ | ||
| 773 | $cacheKey = null; |
|
| 774 | $db = self::getInstance(); |
|
| 775 | ||
| 776 | if ($useCache === true) { |
|
| 777 | $cache = new Cache(null, null, false, $useCache); |
|
| 778 | $cacheKey = 'sql-' . md5($query); |
|
| 779 | ||
| 780 | if ( |
|
| 781 | $cache->getCacheIsReady() === true |
|
| 782 | && |
|
| 783 | $cache->existsItem($cacheKey) |
|
| 784 | ) { |
|
| 785 | return $cache->getItem($cacheKey); |
|
| 786 | } |
|
| 787 | ||
| 788 | } else { |
|
| 789 | $cache = false; |
|
| 790 | } |
|
| 791 | ||
| 792 | $result = $db->query($query); |
|
| 793 | ||