diff --git a/CHANGES b/CHANGES index 8af6d3ae076773a931484a76e22ed0b00eedd15a..801fed83c98a76a6be2c54bad99df2650e332ba2 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,11 @@ 0.2.1 - fixed bug where 'output_encoding' parameter would prevent -render_unicode() from returning a unicode object +render_unicode() from returning a unicode object. +- bumped magic number, which forces template recompile for +this version (fixes incompatible compile symbols from 0.1 +series). +- added a few docs for cache options, specifically those that +help with memcached. 0.2.0 - Speed improvements (as though we needed them, but people diff --git a/doc/build/content/caching.txt b/doc/build/content/caching.txt index 113afd4c7737c92f79012b4f4e35ec5d50241dc8..6599ce62f9ebec4729304952d150dee142502b50 100644 --- a/doc/build/content/caching.txt +++ b/doc/build/content/caching.txt @@ -26,8 +26,10 @@ The options available are: * cached="False|True" - turn caching on * cache_timeout - number of seconds in which to invalidate the cached data. after this timeout, the content is re-generated on the next call. -* cache_type - type of caching. `memory`, `file`, `dbm`, or `memcached`. (TODO: describe extra arguments for memcached) +* cache_type - type of caching. `memory`, `file`, `dbm`, or `memcached`. +* cache_url - (only used for `memcached` but required) a single IP address or a semi-colon separated list of IP address of memcache servers to use. * cache_dir - In the case of the `file` and `dbm` cache types, this is the filesystem directory with which to store data files. If this option is not present, the value of `module_directory` is used (i.e. the directory where compiled template modules are stored). If neither option is available an exception is thrown. +In the case of the `memcached` type, this attribute is required and it's used to store the lock files. * cache_key - the "key" used to uniquely identify this content in the cache. the total namespace of keys within the cache is local to the current template, and the default value of "key" is the name of the def which is storing its data. It is an evaluable tag, so you can put a Python expression to calculate the value of the key on the fly. For example, heres a page that caches any page which inherits from it, based on the filename of the calling template: <%page cached="True" cache_key="${self.filename}"/> diff --git a/lib/mako/codegen.py b/lib/mako/codegen.py index 46dc502de92a02106ebd00813897f9ed3ac685d0..a9255f103e8d86b864fca77819888951491b0cf4 100644 --- a/lib/mako/codegen.py +++ b/lib/mako/codegen.py @@ -11,7 +11,7 @@ import re from mako.pygen import PythonPrinter from mako import util, ast, parsetree, filters -MAGIC_NUMBER = 2 +MAGIC_NUMBER = 3 def compile(node, uri, filename=None, default_filters=None, buffer_filters=None, imports=None, source_encoding=None, generate_unicode=True):