Skip to content

Commit

Permalink
add cache documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Mar 23, 2017
1 parent 14983a6 commit d7e6ee4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
20 changes: 20 additions & 0 deletions docs/configuration/cache.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Cache
-----

RDMO uses a cache for some of it's pages. In the development setup, this is done using local-memory caching. In production, we suggest using `memcached <https://memcached.org>`_. In order to do this you need to install python-memcached:

.. code:: bash
pip install -r requirements/memcached.txt
and add the following to your ``rdmo/settings/local.py``:

.. code:: python
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
'KEY_PREFIX': 'rdmo'
}
}
3 changes: 2 additions & 1 deletion docs/configuration/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ As part of the installation ``rdmo/settings/local.py`` should be creted from the

While technically the local settings file ``rdmo/settings/local.py`` can be used to override all of the settings in ``rdmo/settings/sample.local.py``, it should be used to customize the settings already available in ``rdmo/settings/sample.local.py``.

This comprises :doc:`general settings <general>`, :doc:`database connections <databases>`, how to send :doc:`emails <email>`, the different :doc:`authentication methods <authentication/index>`, and the usage of :doc:`themes <themes>`.
This comprises :doc:`general settings <general>`, :doc:`database connections <databases>`, how to send :doc:`emails <email>`, the different :doc:`authentication methods <authentication/index>`, the usage of :doc:`themes <themes>`, and :doc:`caches <cache>`.

.. toctree::
:maxdepth: 2
Expand All @@ -20,3 +20,4 @@ This comprises :doc:`general settings <general>`, :doc:`database connections <da
email
authentication/index
themes
cache
12 changes: 12 additions & 0 deletions rdmo/settings/sample.local.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,15 @@
'''

# THEME_DIR = os.path.join(BASE_DIR, 'theme')

'''
Cache
'''

# CACHES = {
# 'default': {
# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
# 'LOCATION': '127.0.0.1:11211',
# 'KEY_PREFIX': 'rdmo'
# }
# }

0 comments on commit d7e6ee4

Please sign in to comment.