<blockquote>
  <p>Is it possible at all to do this through Craft?</p>
</blockquote>

<p>Probably, but it kind of depends on what level of caching we're talking about and your specific use-case.</p>

<p>There's an overview of the different caching options available in Craft and what they mean <a href="https://craftcms.stackexchange.com/a/13383/57">here</a>.</p>

CC BY-SA 3.0
2016-01-26T06:13:13.170Z
Superb write up! Bookmarked for checking up on in the future; I did not know that template `{% cache %}` tags always stored cache in the database, and that specifying cache type in `general.php` was separate and for plugin-use exclusively. By default it is doing what I wanted, then. Great links, Cold Cache looks awesome. So many easter eggs here. Craft CMS (& the support here) has made web development "fun" in a way it's never been for me before. Thanks, Brad!
taylor
CC BY-SA 3.0
2016-01-26T06:26:49.380Z
Glad to hear. :)  Moved the answer over to its own question.  Caching is complicated and questions around it get asked often enough that there should be a "definitive" place to point people to.
Brad Bell
CC BY-SA 3.0
2016-01-26T05:52:48.083Z
2016-01-26T06:25:21.890Z
2017-04-13T12:51:00.303Z
Brad Bell
<p>Is it possible to use different types of cache in Craft? <a href="http://www.yiiframework.com/doc-2.0/guide-caching-data.html" rel="nofollow">Yii</a> made a point how different caches are better for different reasons: </p>

<blockquote>
  <p>Tip: You may use different cache storage in the same application. A
  common strategy is to use memory-based cache storage to store data
  that is small but constantly used (e.g. statistical data), and use
  file-based or database-based cache storage to store data that is big
  and less frequently used (e.g. page content).</p>
</blockquote>

<p>There are some pages that need a decent sized portion of content cached, but other areas in plugins that cache small bits of data. It would be nice if I could declare template cache to be "X" cache type, but use other cache types such as Redis in other areas.</p>

<p>Is it possible at all to do this through Craft?</p>

<templating><cache><yii><filecache>
Changing cache type
# Changing cache type

(Asked by: username_0 on 2016-01-24)

Is it possible to use different types of cache in Craft? [Yii](http://www.yiiframework.com/doc-2.0/guide-caching-data.html) made a point how different caches are better for different reasons:

> Tip: You may use different cache storage in the same application. A
> common strategy is to use memory-based cache storage to store data
> that is small but constantly used (e.g. statistical data), and use
> file-based or database-based cache storage to store data that is big
> and less frequently used (e.g. page content).

There are some pages that need a decent sized portion of content cached, but other areas in plugins that cache small bits of data. It would be nice if I could declare template cache to be "X" cache type, but use other cache types such as Redis in other areas.

Is it possible at all to do this through Craft?

**Tags:** templating, cache, yii, filecache

---

## 1 answers

### Answer by username_1 on 2016-01-26. Score: 1 | Accepted answer

> Is it possible at all to do this through Craft?

Probably, but it kind of depends on what level of caching we're talking about and your specific use-case.

There's an overview of the different caching options available in Craft and what they mean [here](https://craftcms.stackexchange.com/a/13383/57).

> **Comments:**
> **username_0**: Superb write up! Bookmarked for checking up on in the future; I did not know that template `{% cache %}` tags always stored cache in the database, and that specifying cache type in `general.php` was separate and for plugin-use exclusively. By default it is doing what I wanted, then. Great links, Cold Cache looks awesome. So many easter eggs here. Craft CMS (& the support here) has made web development "fun" in a way it's never been for me before. Thanks, Brad!  
> **username_1**: Glad to hear. :)  Moved the answer over to its own question.  Caching is complicated and questions around it get asked often enough that there should be a "definitive" place to point people to.  

---

