A guide to creating a custom seed key provider for Umbraco
Umbraco uses a lazy loaded cache, which means that content is loaded into the cache on an as-needed basis. However, you may need specific content to always be in the cache. To achieve this you can implement your own custom seed key providers.
There are two types of seed key providers: IDocumentSeedKeyProvider for documents and IMediaSeedKeyProvider for media. As these interfaces are identical only IDocumentSeedKeyProvider is demonstrated in this article.
Seed keys are cached and calculated once. Any documents created after the site has started will not be included in the seed keys until after a server restart.
Implementation
This example implements a IDocumentSeedKeyProvider which seeds all the children of a node, in this case blog posts.
Create a new class called BlogSeedKeyProvider that implements IDocumentSeedKeyProvider.