Renamed the cache middleware to memcache middleware
This commit is contained in:
parent
183e0623e7
commit
7bbbf3dbef
@ -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
|
||||
|
2
setup.py
2
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',
|
||||
],
|
||||
},
|
||||
)
|
||||
|
@ -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
|
@ -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'})
|
Loading…
x
Reference in New Issue
Block a user