What to do when there are defined constans in a module and you need to change it I have installed a module. In the module there are no configuration options. In the code of the .module, there is a cache time which is set to 20 minutes, in a constant. I need to refresh the data printed by the module with a cache of less than a minute (say seconds). The only solution I have found is to manually change the code and put a value define ('THIS_MODULE_CACHE_LENGTH', 0.1); //-- cache for 6 seconds. Is there another way of doing? Is it a bad designed module? (I do not mention the name if that is the reason). Please advice, because I am worried that with an upgrade to the module I will obviously loose the performance and will recover that excesive 20 minutes times (the module is for content which can upgrade very frenquently, so I do not understand the 20 minutes). Thanks!!
Is there another way of doing? 


Depends where it's used. If the use is hardcoded into a function that doesn't offer any altering, then no, there's no other way other than a hack to change it.

Constants are constant, if they could be changed then they wouldn't be constant any more; if someone has used a constant they should have had a very good reason for doing so. So it's up to you to decide whether you trust the knowledge and design decision of the author. If you don't, don't use the module. Or change it to what you know is correct or reasonable.

At the very least, open an issue to ask the maintainer why they've hardcoded that value. There may have been a very good reason.