---
title: "JobCache.group"
description: "Create or access a hierarchical 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.group

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

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

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

```python
def JobCache.group(name: str) -> JobCache
```

You can nest caches in a hierarchical manner using [groups](/docs/workflows/run-and-inspect/caches#groups-and-hierarchical-keys).
Groups are separated by a forward slash (/) in the key. This hierarchical structure functions similarly to a file system.

## Parameters

**name**

type: str

The name of the cache group.

<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

# use groups to nest related cache values
group = cache.group("some-group")
group["value"] = b"my-value"

nested = group.group("nested")
nested["value"] = b"nested-value"

# access nested groups directly via / notation
value = cache["some-group/nested/value"]
```

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