sedaily-front-end icon indicating copy to clipboard operation
sedaily-front-end copied to clipboard

Better Caching

Open crablar opened this issue 5 years ago • 4 comments

I know that we use Prerender. Can we do some more eager rendering and caching of the main homepage so that it loads more quickly?

crablar avatar Feb 05 '20 15:02 crablar

@sterlingrules What caching do we need to avoid the loading wheel on page load?

crablar avatar Mar 26 '20 21:03 crablar

@crablar There are a bunch of little things I believe we can do. We can start by assessing requests and just making sure we're not making any unnecessary data calls. Then we can improve the server by leveraging memcache and redis. We can also improve the frontend by leveraging client-side storage via vuex-persist.

sterlingrules avatar Mar 27 '20 15:03 sterlingrules

What would we cache in redis? What would vuex-persist do?

crablar avatar Mar 27 '20 18:03 crablar

In Redis, we could cache expensive requests. Possibly the posts feed, user profiles, or topic pages. Whatever sort of request that would have multiple database queries. Heroku provides a Redis add-on. vuex-persist is similar to redux-persist in that it would cache the client-side application state in localStorage. For example, data — even if out of date — could be shown immediately while new data was being fetched.

sterlingrules avatar Mar 27 '20 20:03 sterlingrules