# How to change the caching of 'data files'?

**URL:** <https://zola.discourse.group/t/how-to-change-the-caching-of-data-files/1742>\
**Category:** Uncategorized\
**Created:** [May 12, 2023, 5:21pm UTC](https://zola.discourse.group/t/how-to-change-the-caching-of-data-files/1742 "2023-05-12T17:21:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![spence](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/spence/32/1022_2.png) [@spence](https://zola.discourse.group/u/spence)\
**Post date:** [May 12, 2023, 5:21pm UTC](https://zola.discourse.group/t/how-to-change-the-caching-of-data-files/1742/1 "2023-05-12T17:21:49Z")

</div>

I’m using `load_data` in a new project to load different snippets of text in a complicated, big landing page. It doesn’t really work for me to use one giant markdown file at all. So in my template I just use `load_data` to grab the data. Some of text are stored in markdown files, some are stored as toml too. The site is also multilingual.

One issue that I’m encountering is that when I change text in one of those ‘data files’, I.e. what is passed as an arg to `load_data`, it doesn’t trigger a new build. I saw that in the documentation it says that data files are “[cached based on file modified time](https://www.getzola.org/documentation/templates/overview/#data-caching)”.

Does anyone have any suggestions on how I improve the situation. It’s kind of torturous to make small changes on one of these data files and then have to quit and reload the whole server.

---

<div class="post-metadata">

**Author:** ![jack999](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jack999](https://zola.discourse.group/u/jack999)\
**Post date:** [May 12, 2023, 5:56pm UTC](https://zola.discourse.group/t/how-to-change-the-caching-of-data-files/1742/2 "2023-05-12T17:56:21Z")

</div>

I do the same, keeping a lot of text in either json or just text files, using `load_data` to insert them into my html.

By keeping them in the `content` folder, `zola serve` rebuilds the site every time the files change.

best, j

---

<div class="post-metadata">

**Author:** ![spence](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/spence/32/1022_2.png) [@spence](https://zola.discourse.group/u/spence)\
**Post date:** [May 12, 2023, 6:20pm UTC](https://zola.discourse.group/t/how-to-change-the-caching-of-data-files/1742/3 "2023-05-12T18:20:53Z")

</div>

Thanks J, that definitely worked. Do you by chance know if there’s a way to exclude `.md` within the `content` directory from Zola? I tried the [excluding file assets](https://www.getzola.org/documentation/content/overview/#excluding-files-from-assets) thing from the documentation, but it doesn’t seem to be working.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [May 13, 2023, 1:11am UTC](https://zola.discourse.group/t/how-to-change-the-caching-of-data-files/1742/4 "2023-05-13T01:11:44Z")

</div>

No way to prevent .md loading from the content directory.  
The cache should use the modified time looking at the code so that sounds like a bug?
