---
title: "JobCache.__iter__"
description: "List the direct child keys in a job cache group."
image: "https://tilebox.com/images/tilebox-docs-social-preview.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://tilebox.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# JobCache.__iter__

import { Fragment } from "astro/jsx-runtime";

import ApiReference from "@docs/components/ApiReference.astro";

```python
def JobCache.__iter__() -> Iterator[str]
```

List all available keys in a job cache group. Only keys that are direct children of the current group are returned.
For nested groups, first access the group and then iterate over its keys.

<h2 id="request-example">Usage example</h2>

```python
# within a Tasks execute method,
# access the job cache
# def execute(context: ExecutionContext)
cache = context.job_cache

# iterate over all keys
for key in cache:
    print(cache[key])

# or collect as list
keys = list(cache)

# also works with nested groups
for key in cache.group("some-group"):
    print(cache[key])
```

Source: https://tilebox.com/docs/api-reference/python/tilebox.workflows/JobCache.__iter__/index.mdx
