Thanks for that, it looks clean and useful.
A couple of questions come to mind -
-
You could probably make the cache cleaning conditional - clean only if ‘hideFrom’ intersects with fields array, meaning: only if we have something to hide.
-
I am assuming you used code from the current ViewDetail function to start your own override code. Where exactly is that located? I am wondering if we couldn’t just put this into the core code and make it a generic feature for everyone… that would be quite cool.