---
title: simple
url: https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/
---

**Kind:** Module  
**Package:** compute-sdk-cpp 0.7.0  
**Path:** `fastly::cache::simple`

## Classes

| Name | Summary |
| --- | --- |
| [CacheEntry](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/class.CacheEntry/) | The return type of the closure provided to [get_or_set_with()](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/fn.get_or_set_with/). |
| [CacheError](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/class.CacheError/) | Errors arising from cache operations. |
| [PurgeOptions](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/class.PurgeOptions/) | Options for purge operations. |

## Enums

| Name | Summary |
| --- | --- |
| [CacheError::Code](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/enum.CacheError-Code/) |  |
| [PurgeOptions::Scope](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/enum.PurgeOptions-Scope/) |  |

## Functions

| Name | Summary |
| --- | --- |
| [get](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/fn.get/) | Get the entry associated with the given cache key, if it exists. |
| [get_or_set](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/fn.get_or_set/) | Get the entry associated with the given cache key if it exists, or insert and return the specified entry. |
| [get_or_set_with](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/fn.get_or_set_with/) | Get the entry associated with the given cache key if it exists, or insert and return an entry specified by running the given closure. |
| [purge](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/fn.purge/) | Purge the entry associated with the given cache key. |
| [purge_with_opts](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/cache/simple/fn.purge_with_opts/) | Purge the entry associated with the given cache key with specific options. |
