So I have developed ES + Kibana plugins for Access Control,etc. We have read-only access, index, document, field level security, etc.
Instead of turning off Elasticsearch Node Cache, I want to extend/wrap it via a plugin so i can prevent returning of restricted document via cache. Mainly what I want to do is restrict matching with cached results based on user roles. Eg: if query AND roles match, then only return via cache.
Could someone please enlighten me on the implementation of Node Cache and whether I can alter it's behavior via a plugin?