{% extends "admin/layout.html" %} {% block title %}{{ _("Cache Options") }}{% endblock %} {% block contents %}

{{ _("Cache Options") }}

{% call form() %}

{% trans %} Zine comes with a cache system that allows you to survive a sudden storm of visitors. The caching system has different backends you can choose from and also different settings that you should set depending on the type of server you have and the number of visitors. {% endtrans %}

{% trans %} Keep in mind that if caching is enabled templates will be cached too and as a result of that, they are not reloaded. If you are trying to develop plugins it might be a good idea to disable all caching. {% endtrans %}

{{ _("Cache System") }}

{{ _("Currently Zine supports three caching systems:") }}

{% trans %}Per default no cache system is active.{% endtrans %}

{{ form.cache_system() }}

{{ _("Memcached Options") }}

{% trans %} In order to use the memcached system you have to provide the address of at least one machine running memcached. For further details have a look at the memcached webpage. Separate multiple addresses with commas. This also requires either the cmemcache or python-memcached module. {% endtrans %}

{% trans %} If you for example have a memcached running on localhost (127.0.0.1) port 11211 you would have to enter 127.0.0.1:11211 into the following text field. {% endtrans %}

{{ form.memcached_servers(size=60) }}

{{ _("Filesystem Options") }}

{% trans %} When using the filesystem cache you can control where Zine puts all the cache data. This path is relative to your Zine instance folder and will be created automatically by Zine. Keep in mind that if you change that path and old cache data is left in the old folder, Zine won't clean up the data left for you. {% endtrans %}

{% trans %} One thing you have to keep in mind is that the cache path must be a directory that only Zine uses for file management. The Zine code cleans up there from time to time and it could delete files that are otherwise not tracked by Zine. This is especially the case if you try to cache into /tmp or a similar folder that all kinds of applications use for storing temporary files. {% endtrans %}

{{ form.filesystem_cache_path(size=40) }}

{{ _("General Cache Settings") }}

{% trans %} The following configuration values are cache system-independent. You can use them to fine-tune the caching. The timeout is the number of seconds an item is cached per default. Some items have different cache timeouts though. If “eager caching” is enabled the cache system will cache a lot more but it will have visible side-effects. For example new blog posts won't appear on the index or in the feed for up to the default timeout. {% endtrans %}

{{ form.cache_timeout.as_dd() }} {{ form.enable_eager_caching.as_dd() }}
{% endcall %} {% endblock %}