Disabling compilation cache on particular class or function

I am having a macro class C that use Context.onGenerate inside function F. The result of that is stored for runtime usage (lightweight rtti lets say). This works ok in most of the cases. However, when compilation server is used, and additional classes are added, or modifications done outside of my class M, the function F is not called as whole C being cached (my guess).

The way I can get around it is to disable / restart completion server. However I wonder if there is any more elegant solution to avoid particular class caching, or enforcing particular macros to get re-executed even when completion server is in use.

Thanks for any ideas.

Try this haxe.macro.Context - Haxe 4.2.1 API

Hi @RealyUniqueName , whats your idea on this? How would that help?

You can use that to tell the compiler to drop cached type if certain file has been changed.

This is an interesting idea. Can you also point me to the function that can drop type from cache?