TYP: cache_readonly
- [x] closes #41588
- [ ] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry

I'm not sure how to test this on the CI - pyright is happy on my machine:
```py
import pandas as pd

index: pd.IntervalIndex = pd.IntervalIndex.from_arrays([1], [2])
reveal_type(index)
reveal_type(index.right)
```
```
info: Type of "index" is "IntervalIndex"
info: Type of "index.right" is "Index"
```
If the CI failures prove hard to resolve, could we cheat and write in the .pyi something like `class cache_readonly(property): pass`? > If the CI failures prove hard to resolve, could we cheat and write in the .pyi something like `class cache_readonly(property): pass`?

I must admit, I didn't notice the many mypy failures. I will put the PR into draft mode and locally debug it until I get it working. I will ping you when it is ready :) > If the CI failures prove hard to resolve, could we cheat and write in the .pyi something like `class cache_readonly(property): pass`?

I mistakenly used `Protocol` instead of `Generic`: roughly half of the errors are gone now. There are still many legitimate errors left.

Some remaining `[arg-type]` errors on unions and `[override]` errors  are probably due to a mypy issue (opened https://github.com/python/mypy/issues/11037). see https://github.com/pandas-dev/pandas/issues/41588#issuecomment-911661736