Commit afac2399 authored by Hema Vishnu Pola [Microsoft]'s avatar Hema Vishnu Pola [Microsoft]
Browse files

Merge branch 'krveduru/cacheFix' into 'master'

Using Expire After Write Strategy for caching

See merge request !87
parents 9c5ff165 d6b3d649
Pipeline #38054 passed with stages
in 6 minutes and 57 seconds
......@@ -49,7 +49,7 @@
<reactor.version>Dysprosium-SR12</reactor.version>
<netty.version>4.1.51.Final</netty.version>
<lombok.version>1.18.16</lombok.version>
<osdu.oscorecommon.version>0.9.0-rc4</osdu.oscorecommon.version>
<osdu.oscorecommon.version>0.9.0-rc5</osdu.oscorecommon.version>
<mockito-junit-jupiter.version>2.23.0</mockito-junit-jupiter.version>
<spring-boot-starter-log4j2.version>2.3.4.RELEASE</spring-boot-starter-log4j2.version>
<azure-mgmt-eventgrid.version>1.0.0-beta-3</azure-mgmt-eventgrid.version>
......
......@@ -2,6 +2,7 @@ package org.opengroup.osdu.azure.cache;
import com.microsoft.azure.documentdb.bulkexecutor.DocumentBulkExecutor;
import org.opengroup.osdu.core.common.cache.VmCache;
import org.opengroup.osdu.core.common.cache.enums.CachingStrategy;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
......@@ -16,7 +17,7 @@ public class CosmosBulkExecutorCache extends VmCache<String, DocumentBulkExecuto
* Default cache constructor.
*/
public CosmosBulkExecutorCache() {
super(60 * 60, 1000);
super(60 * 60, 1000, CachingStrategy.EXPIRE_AFTER_WRITE);
}
/**
......
......@@ -2,6 +2,7 @@ package org.opengroup.osdu.azure.cache;
import com.azure.cosmos.CosmosClient;
import org.opengroup.osdu.core.common.cache.VmCache;
import org.opengroup.osdu.core.common.cache.enums.CachingStrategy;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
......@@ -16,7 +17,7 @@ public class CosmosClientCache extends VmCache<String, CosmosClient> {
* Default cache constructor.
*/
public CosmosClientCache() {
super(60 * 60, 1000);
super(60 * 60, 1000, CachingStrategy.EXPIRE_AFTER_WRITE);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment