Skip to content

Register Refresh() as a scheduled service #138

Description

@JeremyCaney

With the wire-up of services migrated to .NET's built-in DI container (#137), we can move the periodic cache-refresh job out of the request path (where it delays intervalled requests) and into a proper background service that runs at startup.

  • Add a hosted service that warms the cache at startup
    • Must hook StartingAsync, not StartAsync, or the server can start accepting requests before the cache is warm
  • Runs the periodic Refresh() in the background (new TopicCacheRefreshService : IHostedLifecycleService`)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions