OpenGenus / memes

MIT License
15 stars 15 forks source link

Caching tags to improve latency #136

Open srivkrnt opened 5 years ago

srivkrnt commented 5 years ago

The recommendation service uses API for fetching the tag list for the images to calculate the score for the matching. Right now every time recommendation service is run these tags are generated and that is an additional overhead.

This can be solved by caching the tags for images because images are static and it ensures that tags will not change for the same image over time. So on the first run for an image the tags can be stored into a field in the JSON and when the recommendation service runs it may first check the JSON for the tags and if they are not present it may request the API for the tags.