---
title: "Cache / HasCacheViewHelper"
manual: "maps2 (Maps2)"
version: "13.1"
source: "AdministratorManual/Template/ViewHelpers/Cache/HasCacheViewHelper.rst"
rendered: "2026-10-01T12:50:05+00:00"
---

# Cache / HasCacheViewHelper {#viewhelper-has-cache}

This is a ViewHelper to check, if a cache entry exists.

## General properties {#viewhelper-has-cache-properties}

-   **prefix**

    -   *Type:* string

    If you want you can define a prefix for the generated CacheIdentifier. Leave
    this value empty to use "infoWindow" as default value

-   **poiCollection**

    -   *Type:* PoiCollection
    -   *Required:* true

    You must assign the PoiCollection object to this ViewHelper. We extract some
    data from PoiCollection to build a more unique CacheIdentifier which can differ
    Caches in multilingual environment.

## Examples {#viewhelper-has-cache-example}

### Basic example {#viewhelper-has-cache-basic-example}

```html
<f:if condition="{maps2:cache.hasCache(poiCollection: poiCollection)}">
  <f:then>
  </f:then>
  <f:else>
  </f:else>
</f:if>
```
