memcached - How to periodically set a global variable in django -
so want have feature like: "random post of hour" website, post object model.
having db choose random post per request can expensive don't want pick row on every request. don't mind if different users have different "random post of day".
i go , cache query, getting memcache involved feels hacky overkill. creating table , job 1 value.
is there way have global variable periodically set in django?
thank you!
went eduardo's solution use memcached: https://docs.djangoproject.com/en/1.3/topics/cache/#the-low-level-cache-api
Comments
Post a Comment