You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works, I just consider it ugly and it exposes an implementation detail. I'm not really a fan of invalidation either (del self.__dict__['cachable']).
cached_property.iscached(self.cachable)? self.cachable.iscached has some issues. (What if the cachable has a different iscached attribute? We could do what namedtuple does and call it _iscached, not because it's protected but to avoid clashes.) Could we do the same for invalidate()?
Sometimes it's useful to be able to check if a property has been cached already. Currently I'm using something like:
(Haven't tested this, but I think it'ill work) Can we think of a better API?
The text was updated successfully, but these errors were encountered: