syntax = "proto3";

package devvit.gateway.cache.v1alpha;

import "reddit/coreplatform/cloudroutines/event/v1/event.proto";

option go_package = "github.snooguts.net/reddit/reddit-devplatform-monorepo/go-common/generated/protos/types/devvit/gateway/cache";

// This proto definition is used to publish/handle events for the global-caching Cloudroutine.
message CacheEntry {
  string key = 1 [(reddit.coreplatform.cloudroutines.event.v1.field) = {sharding_identifier: true}];
  oneof data {
    string value = 2;
    bytes byte_value = 4;
  }
  int64 ttl = 3;
}
