class CampaignCacheClient {

  public Maybe<FetchEligibleCampaignsResponse> get() {
    Maybe<FetchEligibleCampaignsResponse> readFromCache = Maybe.fromCallable(() -> cachedResponse);
    Maybe<FetchEligibleCampaignsResponse> readFromStorage =
        storageClient
            .read(FetchEligibleCampaignsResponse.parser())
            .doOnSuccess(response -> cachedResponse = response);
    return readFromCache
        .switchIfEmpty(readFromStorage)
        .filter(this::isResponseValid)
        .doOnError(s -> cachedResponse = null);
  }

  @Inject  CampaignCacheClient(
      @CampaignCache ProtoStorageClient storageClient, Application application, Clock clock);

}