---
title: soft_purge_surrogate_key
summary: Soft-purge a surrogate key for the current service.
url: https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/http/purge/fn.soft_purge_surrogate_key/
---

**Kind:** Function  
**Module:** [purge](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/http/purge/)  
**Package:** compute-sdk-cpp 0.7.0  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/http/purge.h#L23

```cpp
fastly::expected<void> fastly::http::purge::soft_purge_surrogate_key(std::string_view surrogate_key)
```

Soft-purge a surrogate key for the current service.

See the [Fastly purge documentation](https://developer.fastly.com/learning/concepts/purging/) for details.

**Parameters**

- `surrogate_key`: `std::string_view`

**Returns**

`fastly::expected<void>`
