Closed JisanAR03 closed 1 week ago
I think it is good to cache anonymous users, it speeds up the homepage significantly. What is the issue?
There is a standard Django way to cache a page. In newhome
there is some extra logic for authenticated users email check/verification that can be a middleware and cover all routes instead of just the home page.
Cool, well I'm fine having it only on the homepage. I feel like if it's a middleware, we will have to check all the routes and api. The main issue we are solving is the slow homepage load. I'm open to any solution for that.
@arkid15r , any suggestion for me ?
The point of not having authenticated user related logic is that we could use cache_page
freely -- the content would be the same for everyone.
Also it may be a good idea to start from the other end in terms of page loading optimization -- index Issue::is_hidden or Point::created or make other changes to speed up the view logic.
@arkid15r , any suggestion for me ?
No, not at this time. I believe it's better to leave it for review to @DonnieBLT
@arkid15r ok sure. and also with that I can optimize the home page to . so I'm thinking to create a issue and start optimize the home page .
@DonnieBLT sir , should i do that ? and can you please review this PR too.
Sorry, I'm not sure what the issue is that this PR is solving. I first tried full page caching and then realized that each user has a different view. Ideally, we could have full page caching and then rewrite sections like the user icon or specific user issues using JavaScript but I thought I came up with a quick solution, just using the user session as the cache key it seems to be working OK for me. I'm not sure what problem we ran into. Is this more of an architecture design change or did we run into a specific bug?
@DonnieBLT , now this PR is just update the login cache,.. if user trigger "signin, signout , or logout " any of this ,, my last pr was clear all the cache now this PR only clear the login related cache
Awesome thanks! Feel free to create another issue to address the other concerns.
Awesome thanks! Feel free to create another issue to address the other concerns.
@DonnieBLT Thank you so much
@arkid15r sir, can you please check this commit . update the caching