3 ms·
Yes, and caches the data for a couple of minutes.
by ronnier 16y ago
Yes, and caches the data for a couple of minutes.
- chopsueyar 16y agoHow often is it hitting the server and how many pages deep does it go?
- ronnier 16y agoIt only hits HN when asked, and caches each request for 200 seconds. Additional requests return the cached version instead of re-scrapping HN. It mimics what is on HN. So requesting /page only returns the first page. If you want to go deeper, you need to pass in the next page ID, which is returned when you request /page.
- chopsueyar 16y agoGood work, man!
- jacquesm 16y agoIf the data you get is old then I'd suggest caching it much longer to increase the chance of a hit, it probably will not change anyway. That would lessen the load on the HN servers considerably, especially if your service becomes more popular.