Commit e4fcd41f authored by Jason Madden's avatar Jason Madden

Remove aliasing of PickleCache's target_size/cache_size; just use cache_size...

Remove aliasing of PickleCache's target_size/cache_size; just use cache_size as specified in the interface.
parent 58f1a10e
......@@ -95,7 +95,7 @@ class PickleCache(object):
except AttributeError:
# Some ZODB tests pass in an object that cannot have an _cache
pass
self.target_size = target_size
self.cache_size = target_size
self.drain_resistance = 0
self.non_ghost_count = 0
self.persistent_classes = {}
......@@ -319,8 +319,6 @@ class PickleCache(object):
self.total_estimated_size += new_est_size_in_bytes
cache_size = property(lambda self: self.target_size,
lambda self, nv: setattr(self, 'target_size', nv))
cache_drain_resistance = property(lambda self: self.drain_resistance)
cache_non_ghost_count = property(lambda self: self.non_ghost_count)
cache_data = property(lambda self: dict(self.data.items()))
......
......@@ -459,7 +459,7 @@ class PickleCacheTests(unittest.TestCase):
from persistent._compat import _b
cache = self._makeOne()
cache.drain_resistance = 2
cache.target_size = 90
cache.cache_size = 90
oids = []
for i in range(100):
oid = _b('oid_%04d' % i)
......@@ -996,7 +996,7 @@ class PickleCacheTests(unittest.TestCase):
from persistent.interfaces import UPTODATE
from persistent._compat import _b
cache = self._makeOne()
cache.target_size = 1000
cache.cache_size = 1000
oids = []
for i in range(100):
oid = _b('oid_%04d' % i)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment