Cache it and give the user a tool to see the code and regenerate it when not happy and this is really quite a bit of fun.