| | 188 | |
|---|
| | 189 | Using a custom cache backend |
|---|
| | 190 | ---------------------------- |
|---|
| | 191 | |
|---|
| | 192 | **New in Django development version** |
|---|
| | 193 | |
|---|
| | 194 | While Django includes support for a number of cache backends out-of-the-box, |
|---|
| | 195 | sometimes you will want to use a customised verison or your own backend. To |
|---|
| | 196 | use an external cache backend with Django, use a Python import path as the |
|---|
| | 197 | scheme portion (the part before the initial colon) of the ``CACHE_BACKEND`` |
|---|
| | 198 | URI, like so:: |
|---|
| | 199 | |
|---|
| | 200 | CACHE_BACKEND = 'path.to.backend://' |
|---|
| | 201 | |
|---|
| | 202 | If you're building your own backend, you can use the standard cache backends |
|---|
| | 203 | as reference implementations. You'll find the code in the |
|---|
| | 204 | ``django/core/cache/backends/`` directory of the Django source. |
|---|
| | 205 | |
|---|
| | 206 | Note: Without a really compelling reason, like a host that doesn't support the |
|---|
| | 207 | them, you should stick to the cache backends included with Django. They've |
|---|
| | 208 | been really well-tested and are quite easy to use. |
|---|