# How to use Cache with message API

**URL:** <https://discuss.huggingface.co/t/how-to-use-cache-with-message-api/111727>\
**Category:** 🤗Transformers\
**Created:** [October 13, 2024, 11:22am UTC](https://discuss.huggingface.co/t/how-to-use-cache-with-message-api/111727 "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](https://discuss.huggingface.co/u/BdMelo)\
**Post date:** [October 13, 2024, 11:22am UTC](https://discuss.huggingface.co/t/how-to-use-cache-with-message-api/111727/1 "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
