Hacker News API is based on https://hacker-news.firebaseio.com/v0/newstories.json , open source api.
Steps to run:
- Download code
- Get All dependencies
- Make sure to have .Net8 and Visual Studio 2022 bening used for development Env.
- Run all test cases
- Run the application
Features:
- It fetches top 200 news stories from API and cache into memory
- A background service (timed service) configured to run every 5 min and get new stories and store to memory
- so that our memory cache can be 5 min older in max case
- Background service checks for last refresh time of memory cache and skip if it is less than a min
- Background service bening used to referesh data to avoid long response time