activist icon indicating copy to clipboard operation
activist copied to clipboard

Implement Caching for Improved Response Times

Open momanyisamuel opened this issue 1 year ago • 8 comments

Terms

Description

This is an issue to implement caching for frequently requested data. Django Rest Framework (DRF) offers built-in caching mechanisms that can help achieve this performance improvement. By caching data at the server level, the load will reduce on the database and significantly improve the user experience.

Contribution

Happy to support someone on this issue or work on it myself

momanyisamuel avatar Sep 09 '23 10:09 momanyisamuel

I could do this as well, since it's potentially related to issue #360 concerning the implementation of viewsets. The cleaner approach would be to create a mixin class to inherit in all viewsets. The more labor-intensive way would be to add a decorator to each individual view; the advantage would be more granular control & the ability to exclude some views from caching for security reasons. Any thoughts?

kurtisolo avatar Sep 10 '23 10:09 kurtisolo

@kurtisolo sure, assigning this to you. I like the decorator approach, since as you mentioned we get more granular control.

momanyisamuel avatar Sep 10 '23 11:09 momanyisamuel

Hey there @kurtisolo 👋 Hope all's well :) Let us know how you're doing with this issue 😊 We also have the dev sync/Code Night on Saturday, so we could also discuss there if you're free! Details for that will be in the Development channel on Matrix :)

andrewtavis avatar Nov 15 '23 23:11 andrewtavis

Hey @kurtisolo 👋 Hope you're well! 😊 Checking in to see if you still have interest in working on this. Would be great to have you at another dev sync at some point if you'd have interest. The last one for the year is the 16th, and after that we'll take a break for the New Year and start again on the 18th of January 🥳

andrewtavis avatar Dec 08 '23 18:12 andrewtavis

I'm back :D give me some time and I'll work on this ASAP

kurtisolo avatar Feb 02 '24 09:02 kurtisolo

Welcome back, @kurtisolo! Super happy to have you 😊

andrewtavis avatar Feb 02 '24 10:02 andrewtavis

I'm thinking about implementing python-memcached, it's simple to use. What do you think? Redis could be also a valid option but for this purpose i think it's a overkill..

kurtisolo avatar Feb 02 '24 15:02 kurtisolo

Looking into this a bit, we are trying to type most of what we're writing, so that would normally be a Redis use case, right? I see that it's easy to migrate from Memcached, so no stress if we do one first and migrate the other. Discussions have often been centered around Redis for this though :)

andrewtavis avatar Feb 02 '24 15:02 andrewtavis