# How to use Cache with message API

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-cache-with-message-api%2F111727%3E%5C
**Category:** 🤗Transformers\
**Created:** [October 13, 2024, 11:22am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-cache-with-message-api%2F111727 "2024-10-13T11:22:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BdMelo](https://avatars.discourse-cdn.com/v4/letter/b/7993a0/32.png) [@BdMelo](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FBdMelo)%5C
**Post date:** [October 13, 2024, 11:22am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-use-cache-with-message-api%2F111727%2F1 "2024-10-13T11:22:50Z")

</div>

How to use the `use_cache=False` into the `generate()` method when using the client message API? I’m trying to generate 300 small essays of 350 words and generation is very repetitive. My prompt is 90% static but 10% changes for each generation.  
Thanks  
Bruno
