---
title: ReplaceOptions
summary: Options for cache replace operations.
url: https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/core/struct.ReplaceOptions/
---

**Kind:** Struct  
**Module:** [core](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/core/)  
**Package:** compute-sdk-cpp 0.7.0  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/cache/core.h#L123

Include `fastly/cache/core.h` to use this struct.

Options for cache replace operations.

## Fields

### request_headers

**Type:** `std::optional<detail::RequestHandle>`  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/cache/core.h#L124

### replace_strategy

**Type:** `ReplaceStrategy`  
**Default:** `= ReplaceStrategy::Immediate`  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/cache/core.h#L125

### service

**Type:** `std::optional<std::string>`  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/cache/core.h#L126

### always_use_requested_range

**Type:** `bool`  
**Default:** `= false`  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/cache/core.h#L127
