Skip to content

Commit

Permalink
The 'cache_size' property must be mutable; ZODB's historical_connecti…
Browse files Browse the repository at this point in the history
…on tests depend on it.
  • Loading branch information
jamadden committed Apr 8, 2015
1 parent 13aaa3d commit 380b6f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion persistent/picklecache.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ def update_object_size_estimation(self, oid, new_size):

self.total_estimated_size += new_est_size_in_bytes

cache_size = property(lambda self: self.target_size)
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()))
Expand Down

0 comments on commit 380b6f7

Please sign in to comment.