def set_maxsize(self, maxsize, **kwargs):
new_cache = self._get_cache_impl(self.impl_name, maxsize, **kwargs)<EOL>self._populate_new_cache(new_cache)<EOL>self.cache = new_cache<EOL>
Set maxsize. This involves creating a new cache and transferring the items.