mitodl / mitxonline

BSD 3-Clause "New" or "Revised" License
4 stars 2 forks source link

Change homepage Featured Items to use teh cached set of courses #2204

Closed JenniWhitman closed 3 months ago

JenniWhitman commented 3 months ago

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/4029

Description (What does it do?)

Adds a feature flag for the featured items to come from cache Swapped cache from memcached to redis since we use local memcached and that's tied to process Using the flag, we either grab products the old way OR we grab from cache if =True

How can this be tested?

While the posthog flag is set dev=false, you should see the normal homepage, the items that are set in /cms - this is our control and testing that the posthog flag will work. Next, set the posthog flag dev=true. Now go to the homepage and you should see the items grabbed using create_featured_items() and stored in redis. You can check which these are either by grabbing them from the cache OR by checking the log after running the management command (./manage.py create_featured_items).