Make cached_property more flexibly