<p><strike>You can clear the cache from within the settings section of the control panel. It's possible to select which specific caches to clear if necessary.</strike></p>

<p>You can try manually clearing the cache tables. Test it on a backup first but I have done this in the past with no ill effects.</p>

<p>It sounds like you need to be adding the "globally" keyword to your cache tags. This will drastically reduce the number of rows in the cache table and most likely speed things up too.</p>

CC BY-SA 4.0
2018-10-04T08:04:16.237Z
Thank you. A few days later it seems that the database size has reduced back down to 2mb after removing the cache tags, even though it wasn't working before - perhaps it just took a while to delete all the rows. Thanks!
darylknight
CC BY-SA 4.0
2018-10-02T11:21:39.063Z
2018-10-02T11:21:39.063Z
foamcow
<p>I just noticed that on a site we launched a month ago, the templatecachequeries table is now 500mb. I'm only using the {% cache %} tag in one place on the site, around the main content matrix field. There are about 52000 rows in the templatecachequeries table now.</p>

<p>I've cleared the caches from Utilities, and I've re-saved all the sections but the rows are all still there. Are these meant to get deleted at some point? Is it safe to delete the rows?</p>

<cache>
How do you clear the templatecachequeries table?
# How do you clear the templatecachequeries table?

(Asked by: username_0 on 2018-10-02)

I just noticed that on a site we launched a month ago, the templatecachequeries table is now 500mb. I'm only using the {% cache %} tag in one place on the site, around the main content matrix field. There are about 52000 rows in the templatecachequeries table now.

I've cleared the caches from Utilities, and I've re-saved all the sections but the rows are all still there. Are these meant to get deleted at some point? Is it safe to delete the rows?

**Tags:** cache


---

## 1 answers

### Answer by username_1 on 2018-10-02. Score: 0 | Accepted answer

You can clear the cache from within the settings section of the control panel. It's possible to select which specific caches to clear if necessary.

You can try manually clearing the cache tables. Test it on a backup first but I have done this in the past with no ill effects.

It sounds like you need to be adding the "globally" keyword to your cache tags. This will drastically reduce the number of rows in the cache table and most likely speed things up too.

> **Comments:**
> **username_0**: Thank you. A few days later it seems that the database size has reduced back down to 2mb after removing the cache tags, even though it wasn't working before - perhaps it just took a while to delete all the rows. Thanks!  

---

