anyaudio / anyaudio-server

:musical_note: Simple server to search youtube and give direct audio download and stream links
91 stars 19 forks source link

Set up Redis as primary cache #139

Closed singhpratyush closed 6 years ago

singhpratyush commented 7 years ago

As of now, each time a request is made, Youtube is scraped or youtube-dl is called to return results. This can be made much faster if we introduce Redis datastore as the primary cache, significantly reducing response time for youtube-dl queries.

The time for key expiry can be safely set to 5.5 hours.

On miss, we can go to scrape Youtube.

aviaryan commented 7 years ago

We can use Redismin or RedisLabs for hosting. I will prefer Redismin because it allows a generous 100k keys for the free plan.

singhpratyush commented 7 years ago

@aviaryan: Sounds great.

singhpratyush commented 6 years ago

Fixed in 64cc3df2b7f58ac3f02db08289a32d9589dd2cce with in-house Redis store.