For #92, cache index settings to avoid looking at the index to find the settings. This is to avoid unnecessary roundtrips when logging queries.
Upon first query, the settings are retrieved from the index. For queries after that, the setting is retrieved from the cache:
opensearch_ubi | [2024-03-07T18:22:47,815][INFO ][o.o.u.a.UserBehaviorInsightsActionFilter] [opensearch] Getting setting index.ubi.store for store awesome from the cache.
opensearch_ubi | [2024-03-07T18:22:47,816][INFO ][o.o.u.a.UserBehaviorInsightsActionFilter] [opensearch] Getting setting index.ubi.id_field for store awesome from the cache.
After the store is deleted and recreated, the next search will get the settings from the index since the cache has been cleared.
opensearch_ubi | [2024-03-07T18:23:25,851][INFO ][o.o.u.a.UserBehaviorInsightsActionFilter] [opensearch] Getting setting index.ubi.store for store awesome from the index.
opensearch_ubi | [2024-03-07T18:23:25,853][INFO ][o.o.u.a.UserBehaviorInsightsActionFilter] [opensearch] Getting setting index.ubi.id_field for store awesome from the index.
For #92, cache index settings to avoid looking at the index to find the settings. This is to avoid unnecessary roundtrips when logging queries.
Upon first query, the settings are retrieved from the index. For queries after that, the setting is retrieved from the cache:
After the store is deleted and recreated, the next search will get the settings from the index since the cache has been cleared.