So I want to have a feature like: "Random Post of the hour" for my website, where Post is some object from my model.
Having the DB choose a random post per request can get expensive so I don't want to pick a row on every request. I don't mind if different users have different "Random Post of the day".
I could go and just cache the query, but getting memcache involved with this feels like hacky overkill. So does creating a table and job for just this one value.
Is there a way to have some global variable that get periodically set in django?
Thank you!