Commit e38923b584ffd8ac053f6ef04a800267df84d3c5
1 parent
6b01d022
Exists in
master
and in
19 other branches
Added note about connection pool
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
README.md
@@ -1234,10 +1234,10 @@ Product.search_index.promote(index_name, update_refresh_interval: true) | @@ -1234,10 +1234,10 @@ Product.search_index.promote(index_name, update_refresh_interval: true) | ||
1234 | 1234 | ||
1235 | ### Queuing | 1235 | ### Queuing |
1236 | 1236 | ||
1237 | -Push ids of records needing reindexed to a queue and reindex in bulk for better performance. First, set up Redis in an initializer. | 1237 | +Push ids of records needing reindexed to a queue and reindex in bulk for better performance. First, set up Redis in an initializer. We recommend using [connection_pool](https://github.com/mperham/connection_pool). |
1238 | 1238 | ||
1239 | ```ruby | 1239 | ```ruby |
1240 | -Searchkick.redis = Redis.new | 1240 | +Searchkick.redis = ConnectionPool.new { Redis.new } |
1241 | ``` | 1241 | ``` |
1242 | 1242 | ||
1243 | And ask your models to queue updates. | 1243 | And ask your models to queue updates. |