# Force the cache media function active by default in the mediahub

**URL:** <https://forum.logik.tv/t/force-the-cache-media-function-active-by-default-in-the-mediahub/7458>\
**Category:** Flame Questions\
**Tags:** import, mediahub, cache-media\
**Created:** [January 13, 2023, 10:15am UTC](https://forum.logik.tv/t/force-the-cache-media-function-active-by-default-in-the-mediahub/7458 "2023-01-13T10:15:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebquismoke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/sebquismoke/32/1178_2.png) [@Sebquismoke](https://forum.logik.tv/u/Sebquismoke)\
**Post date:** [January 13, 2023, 10:15am UTC](https://forum.logik.tv/t/force-the-cache-media-function-active-by-default-in-the-mediahub/7458/1 "2023-01-13T10:15:37Z")

</div>

Hi,

In order to avoid a recurring error during imports, is it possible via the configuration files to force the cache media function active by default in the mediahub each time the flame is started?

Thanks

---

<div class="post-metadata">

**Author:** ![Sebquismoke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.logik.tv/sebquismoke/32/1178_2.png) [@Sebquismoke](https://forum.logik.tv/u/Sebquismoke)\
**Post date:** [January 13, 2023, 2:12pm UTC](https://forum.logik.tv/t/force-the-cache-media-function-active-by-default-in-the-mediahub/7458/2 "2023-01-13T14:12:07Z")

</div>

![](https://us1.discourse-cdn.com/flex020/uploads/thedepartmentofexternalservices/original/2X/6/6f0526cca9ac52a6ba15a8695496049d6665fc12.jpeg)

Merci à Frederic Warren pour cette réponse

* * *

Bonjour Sébastien,

One thing you can do right now to make sure that Cache is always enabled by default is to add:

import flame  
flame.mediahub.files.options.cache\_mode = True

in the app\_initialized() hook available in /opt/Autodesk//python/[hook.py](http://hook.py/)

That way the option will always be enabled when the application is launched
