@carobaro
It should go into the root directory for your modx install. However, depending on your host provider it may or may not work. Good luck!
@carobaro
look at the help docs of your host, some hosts dont let you change php settings so watch out for that too
mediatemple has it in the /etc/ folder (while the site content itself is in the /domains/domain.com/html/ folder)
if your host has no way to set php settings, ask them to change the setting on your account or just disable caching settings in the database manually like the earlier tip