A helper to enable caching in require plugins.