I don't think TemplateLoader should know anything about directive. It should be

<pre>
class BlockCache {
   BlockType fromHtml(String html)...;
   Future<BlockType> fromUrl(String url)...;
}
</pre>