diff --git a/etc/proxy-server.conf-sample b/etc/proxy-server.conf-sample index e81cea65a4..04fb01fa68 100644 --- a/etc/proxy-server.conf-sample +++ b/etc/proxy-server.conf-sample @@ -46,7 +46,7 @@ use = egg:swift#auth use = egg:swift#healthcheck [filter:cache] -use = egg:swift#cache +use = egg:swift#memcache # Default for memcache_servers is below, but you can specify multiple servers # with the format: 10.1.2.3:11211,10.1.2.4:11211 # memcache_servers = 127.0.0.1:11211 diff --git a/setup.py b/setup.py index 931442b1da..2a3084e110 100644 --- a/setup.py +++ b/setup.py @@ -86,7 +86,7 @@ setup( 'paste.filter_factory': [ 'auth=swift.common.middleware.auth:filter_factory', 'healthcheck=swift.common.middleware.healthcheck:filter_factory', - 'cache=swift.common.middleware.cache:filter_factory', + 'memcache=swift.common.middleware.memcache:filter_factory', ], }, ) diff --git a/swift/common/middleware/cache.py b/swift/common/middleware/memcache.py similarity index 93% rename from swift/common/middleware/cache.py rename to swift/common/middleware/memcache.py index 0199261751..8b7030eafa 100644 --- a/swift/common/middleware/cache.py +++ b/swift/common/middleware/memcache.py @@ -14,7 +14,7 @@ from swift.common.memcached import MemcacheRing -class CacheMiddleware(object): +class MemcacheMiddleware(object): """ Caching middleware that manages caching in swift. """ @@ -32,5 +32,5 @@ def filter_factory(global_conf, **local_conf): conf = global_conf.copy() conf.update(local_conf) def cache_filter(app): - return CacheMiddleware(app, conf) + return MemcacheMiddleware(app, conf) return cache_filter diff --git a/test/unit/common/middleware/test_cache.py b/test/unit/common/middleware/test_memcache.py similarity index 91% rename from test/unit/common/middleware/test_cache.py rename to test/unit/common/middleware/test_memcache.py index a83233e2eb..a6f9336fec 100644 --- a/test/unit/common/middleware/test_cache.py +++ b/test/unit/common/middleware/test_memcache.py @@ -17,7 +17,7 @@ import unittest from webob import Request -from swift.common.middleware import cache +from swift.common.middleware import memcache from swift.common.memcached import MemcacheRing class FakeApp(object): @@ -30,7 +30,7 @@ def start_response(*args): class TestCacheMiddleware(unittest.TestCase): def setUp(self): - self.app = cache.CacheMiddleware(FakeApp(), {}) + self.app = memcache.MemcacheMiddleware(FakeApp(), {}) def test_cache_middleware(self): req = Request.blank('/something', environ={'REQUEST_METHOD': 'GET'})