Caching Strategy for SpatialRefSysMixin.srs

Thank you @sarahboyce, for pointing out the historical context and linking the relevant ticket.

I agree that removing the caching logic altogether might simplify significantly, especially if we don’t have evidence of frequent or critical performance issues caused by the absence of caching. If performance regressions arise later, we could reintroduce caching with a more informed approach.

Using @cached_property is an excellent suggestion. It would deliver improved performance without adding the complexities of manual cache management.

I will take a closer look at how often the srs property is accessed in typical workflows to evaluate the trade-offs. Based on this discussion, I would propose removing caching entirely or replacing it with @cached_property, if there are no objections. I’ll also include a clear note in the documentation about the rationale for the change.

1 Like