RTAS: Macro for disabling gestalt IsCacheable

Hi Jules, in the RTAS wrapper, could you please change

#ifndef JUCE_DEBUG AddGestalt (pluginGestalt_IsCacheable); #endif

to something like

#if JUCE_DEBUG #else #ifndef JUCE_RTAS_PLUGINGESTALT_NOT_CACHEABLE AddGestalt (pluginGestalt_IsCacheable); #endif #endif

So that we can control this behaviour? Thanks.

PS: why is it currently use in an #ifndef? I read in juce_core.h that it should always be defined, should it not be an #if?

Yes, good request, I can add that.

It’s just an oversight that it’s using #ifdef… Will tidy that up, thanks!

Thanks Jules!

I was wondering if there was no alternative way of activating/deactivating that (without rebuilding the whole project), for instance by providing the wrapper with a list of properties…

Can’t really see how that’d be of any benefit?

Altering a macro invalidates all compiled object files which depend on the header or build command line options. Editing a property definition (like wrapperOptions.add(gestalt_iscacheable, true):wink: just invalidates the one file which defines the property.

How often do you intend to change the value of this flag?

You can put this macro in the build option of this single file FWIW

As much as I need in order to debug issues at this level.

Indeed, that’s a good idea, at least in order to debug issues; however:

  • For other macros which are shared amongst multiple files, that’s not handy,
  • I prefer putting such config in source code instead of project, to ease porting between IDEs/OSs,
  • If the setting is in a plug-in specific source code, having something else than a macro is easing towards the creation of a Juce static library (shared between multiple plug-ins).