Pass config in define_layout
Add compile_layouts macro
Don't use cache when it's unavailable (e.g. at compile time)
Define render function in compiled layouts