Commit b42691f7 authored by Krishna Nikhil Vedurumudi's avatar Krishna Nikhil Vedurumudi
Browse files

Using Expire After Write Strategy for caching

parent 9c5ff165
Pipeline #37677 failed with stage
in 9 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.azure.storage.blob.BlobContainerClient;
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 BlobContainerClientCache extends VmCache<String, BlobContainerClien
* Default cache constructor.
*/
public BlobContainerClientCache() {
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.storage.blob.BlobServiceClient;
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 BlobServiceClientCache extends VmCache<String, BlobServiceClient> {
* Default cache constructor.
*/
public BlobServiceClientCache() {
super(60 * 60, 1000);
super(60 * 60, 1000, CachingStrategy.EXPIRE_AFTER_WRITE);
}
/**
......
......@@ -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