CRM-14949 - Switch dynamic js to a file instead of a callback
CRM-14949 - Flush dynamic resources when clearing caches