From b59438c28f2d9fd589e5371c47803aaf68c46213 Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Tue, 2 Apr 2013 17:42:56 +0200 Subject: [PATCH] Add comments about middleware aim and usage --- middlewares/last_modified.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/middlewares/last_modified.py b/middlewares/last_modified.py index 2d35b0a..c16d22b 100644 --- a/middlewares/last_modified.py +++ b/middlewares/last_modified.py @@ -25,6 +25,23 @@ from swift.common.wsgi import make_pre_authed_request class LastModifiedMiddleware(object): """ + LastModified is a middleware that add a meta to a container + when that container and/or objects in it are modified. The meta + data will contains the epoch timestamp. This middleware aims + to be used with the synchronizer. It limits the tree parsing + by giving a way to know a container has been modified since the + last container synchronization. + + Actions that lead to the container meta modification : + - POST/PUT on container + - POST/PUT/DELETE on object in it + + The following shows an example of proxy-server.conf: + [pipeline:main] + pipeline = catch_errors cache tempauth last-modified proxy-server + + [filter:last-modified] + use = egg:swift#last_modified """ def __init__(self, app, conf):