Author: leidel
Date: Sat Nov 1 21:16:27 2008
New Revision: 63
Modified:
wiki/FilesystemCaching.wiki
Log:
Edited wiki page through web user interface.
Modified: wiki/FilesystemCaching.wiki
==============================================================================
--- wiki/FilesystemCaching.wiki (original)
+++ wiki/FilesystemCaching.wiki Sat Nov 1 21:16:27 2008
@@ -3,11 +3,11 @@
= Filesystem Caching =
-If a settings variable `DBTEMPLATES_CACHE_DIR` is available and set to an
existing directory, this directory will be used to cache templates from the
database in this directory.
+If a settings variable `DBTEMPLATES_CACHE_BACKEND` is set
to 'dbtemplates.cache.FileSystemBackend' and `DBTEMPLATES_CACHE_DIR` is
available and set to an existing directory, this directory will be used to
cache templates from the database in this directory.
-The motivation behind this is, that database-queries are reduced.
Templates loaded from the filesystem should be cached by your
operating-systems filesystem-cache in ram pretty well (if not otherwise
cached by django).
+The motivation behind this is, that database-queries are reduced.
Templates loaded from the filesystem should be cached by your
operating-systems filesystem-cache in ram pretty well (if not otherwise
cached by Django).
-As a side-effect this makes development easier, because every dbtemplate
is written to disk and can be edited there. The changes are immediatley
available. After finishing your template changes, just save the code back
to the db via django's admin interface.
+As a side-effect this makes development easier, because every dbtemplate
is written to disk and can be edited there. The changes are immediatley
available. After finishing your template changes, just save the code back
to the db via Django's admin interface.
= Performance =
@@ -18,7 +18,7 @@
* ... if a cache-dir is available the template is read from there, like
django's filesystem-template-loader does. Only if it doesn't exist (should
only apply to the first request) it's fetched from the db and written to
the cache-dir.
* ... if a cache-dir is not available the template is read from
database, excactly like in old versions of django-databasetemplateloader
and without any filesystem-overhead.
-The only (small) performance-hit you may encounter is, if you configured a
cache-dir, but it's not writeable by the user running the django-app (e.g.
www-user). In this situation every request for a template will try to read
it from disk, doesn't find it, load it from the database, try to write to
the cache-dir (which will fail) and then return it. So operation will not
fail, but may slow a busy site down.
+The only (small) performance-hit you may encounter is, if you configured a
cache-dir, but it's not writeable by the user running the Django-app (e.g.
www-user). In this situation every request for a template will try to read
it from disk, doesn't find it, load it from the database, try to write to
the cache-dir (which will fail) and then return it. So operation will not
fail, but may slow a busy site down.
= Configuration =
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---