caching inline templates requires too much memory