Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
Merged
Prev Previous commit
Next Next commit
demove disk cache in favor of envelope cache
  • Loading branch information
marandaneto committed Sep 1, 2020
commit 2a62aae02cf363609efc0589d6784c0350df5fcd
2 changes: 0 additions & 2 deletions sentry-core/src/main/java/io/sentry/core/Sentry.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.sentry.core;

import io.sentry.core.cache.DiskCache;
import io.sentry.core.cache.EnvelopeCache;
import io.sentry.core.protocol.SentryId;
import io.sentry.core.protocol.User;
Expand Down Expand Up @@ -197,7 +196,6 @@ private static boolean initConfigurations(final @NotNull SentryOptions options)
final File outboxDir = new File(options.getOutboxPath());
outboxDir.mkdirs();

options.setEventDiskCache(new DiskCache(options));
options.setEnvelopeDiskCache(new EnvelopeCache(options));
} else {
logger.log(SentryLevel.INFO, "No outbox dir path is defined in options.");
Expand Down
23 changes: 0 additions & 23 deletions sentry-core/src/main/java/io/sentry/core/SentryOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import com.jakewharton.nopen.annotation.Open;
import io.sentry.core.cache.IEnvelopeCache;
import io.sentry.core.cache.IEventCache;
import io.sentry.core.protocol.SdkVersion;
import io.sentry.core.transport.ITransport;
import io.sentry.core.transport.ITransportGate;
import io.sentry.core.transport.NoOpEnvelopeCache;
import io.sentry.core.transport.NoOpEventCache;
import io.sentry.core.transport.NoOpTransport;
import io.sentry.core.transport.NoOpTransportGate;
import java.io.File;
Expand Down Expand Up @@ -198,9 +196,6 @@ public class SentryOptions {
/** whether to ignore TLS errors */
private boolean bypassSecurity = false;

/** Reads and caches event json files in the disk */
private @NotNull IEventCache eventDiskCache = NoOpEventCache.getInstance();

/** Reads and caches envelope files in the disk */
private @NotNull IEnvelopeCache envelopeDiskCache = NoOpEnvelopeCache.getInstance();

Expand Down Expand Up @@ -887,24 +882,6 @@ public void setBypassSecurity(boolean bypassSecurity) {
this.bypassSecurity = bypassSecurity;
}

/**
* Returns the EventCache interface
*
* @return the EventCache object
*/
public @NotNull IEventCache getEventDiskCache() {
return eventDiskCache;
}

/**
* Sets the EventCache interface
*
* @param eventDiskCache the EventCache object
*/
public void setEventDiskCache(final @Nullable IEventCache eventDiskCache) {
this.eventDiskCache = eventDiskCache != null ? eventDiskCache : NoOpEventCache.getInstance();
}

/**
* Returns the EnvelopeCache interface
*
Expand Down
130 changes: 0 additions & 130 deletions sentry-core/src/main/java/io/sentry/core/cache/DiskCache.java

This file was deleted.

30 changes: 0 additions & 30 deletions sentry-core/src/main/java/io/sentry/core/cache/IEventCache.java

This file was deleted.

This file was deleted.

114 changes: 0 additions & 114 deletions sentry-core/src/test/java/io/sentry/core/cache/DiskCacheTest.kt

This file was deleted.