Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions events-processor/models/charge_cache.go

This file was deleted.

69 changes: 0 additions & 69 deletions events-processor/models/charge_cache_test.go

This file was deleted.

31 changes: 0 additions & 31 deletions events-processor/processors/events_processor/cache_service.go

This file was deleted.

192 changes: 0 additions & 192 deletions events-processor/processors/events_processor/cache_service_test.go

This file was deleted.

7 changes: 1 addition & 6 deletions events-processor/processors/events_processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ type EventProcessor struct {
EnrichmentService *EventEnrichmentService
ProducerService *EventProducerService
RefreshService *SubscriptionRefreshService
CacheService *CacheService
}

func NewEventProcessor(enrichmentService *EventEnrichmentService, producerService *EventProducerService, refreshService *SubscriptionRefreshService, cacheService *CacheService) *EventProcessor {
func NewEventProcessor(enrichmentService *EventEnrichmentService, producerService *EventProducerService, refreshService *SubscriptionRefreshService) *EventProcessor {
return &EventProcessor{
EnrichmentService: enrichmentService,
ProducerService: producerService,
RefreshService: refreshService,
CacheService: cacheService,
}
}

Expand Down Expand Up @@ -157,9 +155,6 @@ func (processor *EventProcessor) processEvent(ctx context.Context, event *models
if flagResult.Failure() {
return failedResult(flagResult, "flag_subscription_refresh", "Error flagging subscription refresh")
}

// Expire cache at charge and charge filter level
processor.CacheService.ExpireCache(ctx, enrichedEvents)
}

return utils.SuccessResult(enrichedEvent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ func setupProcessorTestEnv(t *testing.T, useCache bool) *ProcessorTestEnv {

testProducers := setupProducers()
chargeCache = &tests.MockCacheStore{}
chargeCacheStore := models.NewChargeCache(&chargeCache)
flagStore := tests.MockFlagStore{}
flagger := NewSubscriptionRefreshService(&flagStore)

Expand All @@ -197,7 +196,6 @@ func setupProcessorTestEnv(t *testing.T, useCache bool) *ProcessorTestEnv {
NewEventEnrichmentService(apiStore, memCache),
testProducers.producerService,
flagger,
NewCacheService(chargeCacheStore),
)

return &ProcessorTestEnv{
Expand Down
Loading
Loading