Open bjester opened 1 year ago
Hi, @bjester . I'm new to studio and would like to start my journey with this issue. I understand this issue but don't know much about edge caching. So can you please guide me to know about them and help to find the right files which need to be changed under this issue? Thanks :)
Hi @alphaket14, thank you for your interest. Here are some details:
kolibri-public
branch as base and target for your PRlocale
and session
middleware that will prevent adding headers (like cookies) that will break cachingcontentcuration/kolibri_public/views_v1
to respond with the appropriate headersChannel.last_published
datetime for Last-modified
header@alphaket14 Apologies, I forgot one thing. There is a caching decorator that should exist in the kolibri-public
branch which you can look at for similar functionality https://github.com/learningequality/studio/blob/5e1316963c4a5937d376dcddcb2d9cd887b8e672/contentcuration/kolibri_public/views.py#L54
One other thing to note is this comment about how we handle caching for as yet unrecognized device versions in the Info endpoint - we should follow the recommendation of @bjester here: https://github.com/learningequality/studio/pull/3987#discussion_r1137474248 and disable the caching headers conditionally when we have an unrecognized device info version.
Hi @alphaket14, just checking in that you're indeed intending to address this?
Hi @bjester , I was facing issue during the wsl local setup of /studio branch,
The issue was this : [(https://stackoverflow.com/questions/44678725/cannot-connect-to-the-docker-daemon-at-unix-var-run-docker-sock-is-the-docker)
]
Although I had docker desktop running,
This occurred when I tried running the command : make run-services
Then I dual booted my PC with ubuntu 22.04, currently setting up the local development Will contact you very soon, and yes I am intending to solve this problem
@bjester I am not able to resolve this issue, can i get some help This occured when I made the make run-services
This time docker daemon was running Also the error mentioned module celery is also present
Hi @alphaket14, thanks for showing your interest in this issue. Currently this issue is a priority for the next release and hence I would be picking this up to work on with. I understand that setting up studio can be a bit overwhelming at first and may need some time as you may run into issues. I would suggest instead try setting up the Kolibri as it is a bit easier than studio, kolibri also has many open issues that may be good to help with. You can take your time and explore other issues that are open in studio too.
Background
We're adding new V2 APIs from Kolibri to Studio, and we're adding Cloudflare page rules to make sure that we can obtain optimal caching of the API responses
Desired behavior
The existing
/api/public
endpoints:Last-modified
and support handling theIf-modified-since
headerCache-control: public, stale-while-revalidate=100, max-age=300
Current behavior
These endpoints do not return or support caching
Value add
Better edge caching through Cloudflare, meaning better worldwide browsing of public channels through Kolibri.