Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#25076 removing contentlet cache after wait for, force cache #25077

Merged
merged 3 commits into from Jun 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -23,6 +23,7 @@
import com.dotcms.variant.model.Variant;
import com.dotmarketing.business.APILocator;
import com.dotmarketing.business.CacheLocator;
import com.dotmarketing.business.cache.provider.CacheProvider;
import com.dotmarketing.common.db.DotConnect;
import com.dotmarketing.common.reindex.BulkProcessorListener;
import com.dotmarketing.common.reindex.ReindexEntry;
Expand Down Expand Up @@ -576,12 +577,14 @@ private void indexContentListNow(final List<Contentlet> contentToIndex) {
final BulkRequest bulkRequest = createBulkRequest(contentToIndex);
bulkRequest.setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
putToIndex(bulkRequest);
CacheLocator.getESQueryCache().clearCache();
} // indexContentListNow.

private void indexContentListWaitFor(final List<Contentlet> contentToIndex) {
final BulkRequest bulkRequest = createBulkRequest(contentToIndex);
bulkRequest.setRefreshPolicy(WriteRequest.RefreshPolicy.WAIT_UNTIL);
putToIndex(bulkRequest);
CacheLocator.getESQueryCache().clearCache();
} // indexContentListWaitFor.

private void indexContentListDefer(final List<Contentlet> contentToIndex) {
Expand Down