<p>There's not a native Craft way to do that.</p>

<p>You could setup a cron job that hit a <a href="http://pluginfactory.io" rel="nofollow noreferrer">plugin's</a> <a href="https://craftcms.com/docs/plugins/controllers" rel="nofollow noreferrer">controller</a> and delete items in cache based on size/date created, etc.</p>

<p>My guess is you've got a plugin installed doing some heavy caching. You can try opening the largest cache files (it's all just serialized text data) and see if the type of data gives you a clue to where it's coming from.</p>

CC BY-SA 3.0
2016-11-10T08:44:47.983Z
Thanks Brad - so on a vanilla Craft install, the cache folder would not grow substantially?
Richard Frank
CC BY-SA 3.0
2016-11-10T23:15:30.560Z
Nope. Craft only caches for 24 hour by default, so out-of-the-box it should be pretty self-sustaining.
Brad Bell
CC BY-SA 3.0
2016-11-06T16:11:20.513Z
2016-11-06T16:11:20.513Z
Brad Bell
<p>My runtime/cache folder is over 200GB in size. Is there a config setting or some way of limiting the size of the folder, rather than the cache duration?</p>

<p>Secondly, what could cause such disk usage?</p>

<cache><filecache>
How to limit cache folder size
# How to limit cache folder size

(Asked by: username_0 on 2016-11-06)

My runtime/cache folder is over 200GB in size. Is there a config setting or some way of limiting the size of the folder, rather than the cache duration?

Secondly, what could cause such disk usage?

**Tags:** cache, filecache

---

## 1 answers

### Answer by username_1 on 2016-11-06. Score: 2 | Accepted answer

There's not a native Craft way to do that.

You could setup a cron job that hit a [plugin's](http://pluginfactory.io) [controller](https://craftcms.com/docs/plugins/controllers) and delete items in cache based on size/date created, etc.

My guess is you've got a plugin installed doing some heavy caching. You can try opening the largest cache files (it's all just serialized text data) and see if the type of data gives you a clue to where it's coming from.

> **Comments:**
> **username_0**: Thanks Brad - so on a vanilla Craft install, the cache folder would not grow substantially?  
> **username_1**: Nope. Craft only caches for 24 hour by default, so out-of-the-box it should be pretty self-sustaining.  

---

