# DataType:cachedbuff

Allows checking if cached buffs on others have expired with out targeting

## Members

| **Type**                                                                                       | **Member**     | **Description**                                            |
| ---------------------------------------------------------------------------------------------- | -------------- | ---------------------------------------------------------- |
| \_\_[*string*](/macroquest/data-types-and-top-level-objects/data-types/datatype-string.md)\_\_ | **CasterName** | Returns the name of the caster who applied the cached buff |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md)               | **Count**      | Returns the amount of buffs catched, or -1 it none         |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md)               | **Duration**   | Returns the duration of the cached buff                    |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md)               | **Slot**       | Returns the buff slot the target had the buff in           |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md)               | **SpellID**    | Returns the buff's spell ID                                |

### Example

-Previously Added: .CachedBuffCount to the spawn tlo. it returns -1 if no buffs are cached for the spawn or number of buffs cached.

-Previously Added: .CachedBuff\[x] to the spawn tlo where x is a spellid if its a number and a spell name if not. It returns a MQ2CachedBuffType.

-Previously Added: .CachedBuff\[#x] to the spawn tlo where #x is a buffslot between 1-97. It returns a MQ2CachedBuffType.

-Previously Added: .CachedBuff\[\*x] to the spawn tlo where \*x is a index (buffslots are not sorted). It returns a MQ2CachedBuffType.

-Previously Added: .CachedBuff\[^x] to the spawn tlo where ^x is a keyword. It returns a MQ2CachedBuffType.

`^x keywords: Slowed Rooted Mezzed Crippled Maloed Tashed Snared and Beneficial`

-Using CachedBuff to get buff info on targets, group members etc, only requires you to target the entity once. after thats done, buffs are cached. -The upside is obviously that we don't have to target back and forth constantly.

`Usage: well lets say you are a druid and you want to know if a group members sow buff has worn off, you can just check CachedBuff without having to retarget the group member.`\
`/echo ${Group.Member[2].CachedBuff[Spirit of Wolf].Duration}`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://macroquest.gitbook.io/macroquest/data-types-and-top-level-objects/data-types/datatype-cachedbuff.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
