TeamNewPipe / web-api

REST API providing external data feeds for the NewPipe website. Written as a micro service. In Python.
MIT License
22 stars 9 forks source link

Performance Improvements #9

Closed yausername closed 2 years ago

yausername commented 4 years ago
TobiGr commented 4 years ago

@TheAssassin would you mind taking a look at this? This helps me to spend my rare free time on the app and extractor.

TheAssassin commented 4 years ago

Moves some code around. I'm not entirely why cache expiry shouldn't lead to a lock. Doesn't that trigger more than one update of the cache?

yausername commented 4 years ago

I'm not entirely why cache expiry shouldn't lead to a lock. Doesn't that trigger more than one update of the cache?

Lock is still there in fetch_fresh_data function. But now the request does not block for cache to update, instead the "expired" cached data is served. It is a minor thing which will prevent latency spikes for one user every hour.